Merge pull request #732 from puffnfresh/patch-1

Use shellwords for nix-shell shebang
This commit is contained in:
Eelco Dolstra 2015-12-14 13:45:33 +01:00
commit 32ea8a9898

View file

@ -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);
}
}
}