nix-shell: Fix file name resolution in shebangs

This commit is contained in:
Shea Levy 2017-10-19 15:02:40 -04:00
parent ef1d0142a0
commit c7af84ce84
No known key found for this signature in database
GPG key ID: 5C0BD6957D86FE27

View file

@ -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. */