From a70706b0253e3bbd9143fde16e65fb7fe1a4007d Mon Sep 17 00:00:00 2001 From: Albert Safin Date: Sat, 14 Dec 2019 15:37:20 +0000 Subject: nix-shell: don't check for "nix-shell" in shebang script name --- src/nix-build/nix-build.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nix-build/nix-build.cc') 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(readFile(script), "\n"); -- cgit v1.2.3