Skip to content
Snippets Groups Projects
Commit 9018deab authored by Brian McKenna's avatar Brian McKenna
Browse files

Use shellwords for nix-shell shebang

Previously we can't have quoted arguments.

This now allows us to use things like `ghcWithPackages`
parent d1e3bf01
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment