aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbert Safin <xzfcpw@gmail.com>2019-12-14 15:37:20 +0000
committerAlbert Safin <xzfcpw@gmail.com>2019-12-14 15:37:20 +0000
commita70706b0253e3bbd9143fde16e65fb7fe1a4007d (patch)
tree799c6a5217d750fdd6e8da672fe6427bfd8e7fcc /src
parentac9cc2ec08e95910ecb73745cb011596a33723f0 (diff)
nix-shell: don't check for "nix-shell" in shebang script name
Diffstat (limited to 'src')
-rwxr-xr-xsrc/nix-build/nix-build.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc
index 73e3a347b..205165a4c 100755
--- a/src/nix-build/nix-build.cc
+++ b/src/nix-build/nix-build.cc
@@ -106,7 +106,7 @@ static void _main(int argc, char * * argv)
// Heuristic to see if we're invoked as a shebang script, namely,
// if we have at least one argument, it's the name of an
// executable file, and it starts with "#!".
- if (runEnv && argc > 1 && !std::regex_search(argv[1], std::regex("nix-shell"))) {
+ if (runEnv && argc > 1) {
script = argv[1];
try {
auto lines = tokenizeString<Strings>(readFile(script), "\n");