about summary refs log tree commit diff
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2017-10-19T19·02-0400
committerShea Levy <shea@shealevy.com>2017-10-19T19·02-0400
commitc7af84ce846a9deefa5b4db1b1bce1c091ca2a1e (patch)
treed3bdcdc14e0f3c0a8aea61f8b3ddd7f3f9dfe75a
parentef1d0142a056d4441fb6ba8ecb42da833ebb3ba0 (diff)
nix-shell: Fix file name resolution in shebangs
-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 a3d3c8007be6..4541c89a700c 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. */