From c7af84ce846a9deefa5b4db1b1bce1c091ca2a1e Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Thu, 19 Oct 2017 15:02:40 -0400 Subject: [PATCH] nix-shell: Fix file name resolution in shebangs --- src/nix-build/nix-build.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc index a3d3c8007..4541c89a7 100755 --- a/src/nix-build/nix-build.cc +++ b/src/nix-build/nix-build.cc @@ -278,7 +278,7 @@ void mainWrapped(int argc, char * * argv) /* If we're in a #! script, interpret filenames relative to the script. */ exprs.push_back(state.parseExprFromFile(resolveExprPath(lookupFileArg(state, - inShebang && !packages ? absPath(i, dirOf(script)) : i)))); + inShebang && !packages ? absPath(i, absPath(dirOf(script))) : i)))); } /* Evaluate them into derivations. */