about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-12-14T12·45+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-12-14T12·45+0100
commit32ea8a98986b3f6629628ab2c0f395fef38bcbaa (patch)
tree0f968759ea1df9a186f4bfe14bc7ba760d99ce91
parent399397c90740301e7f38ff397fe6a5d5b4dc080b (diff)
parent9018deab6c4242e3747f6b0831cc59c9dddaed99 (diff)
Merge pull request #732 from puffnfresh/patch-1
Use shellwords for nix-shell shebang
-rwxr-xr-xscripts/nix-build.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/nix-build.in b/scripts/nix-build.in
index 0a4431681cb1..ea099532b7cb 100755
--- a/scripts/nix-build.in
+++ b/scripts/nix-build.in
@@ -6,6 +6,7 @@ use Nix::Config;
 use Nix::Store;
 use Nix::Utils;
 use File::Basename;
+use Text::ParseWords;
 use Cwd;
 
 binmode STDERR, ":encoding(utf8)";
@@ -56,7 +57,7 @@ if ($runEnv && defined $ARGV[0] && $ARGV[0] !~ /nix-shell/) {
             while (<SCRIPT>) {
                 chomp;
                 if (/^\#\!\s*nix-shell (.*)$/) {
-                    push @ARGV, split(/ /, $1);
+                    push @ARGV, shellwords(/ /, $1);
                 }
             }
         }