mirror of
https://github.com/NixOS/nix
synced 2025-06-28 09:31:16 +02:00
Merge remote-tracking branch 'matthewbauer/nix-shell-relative-shebang' into more-nix-shell
This commit is contained in:
commit
8838f5c746
3 changed files with 24 additions and 1 deletions
|
@ -334,8 +334,13 @@ static void main_nix_build(int argc, char * * argv)
|
|||
exprs = {state->parseStdin()};
|
||||
else
|
||||
for (auto i : remainingArgs) {
|
||||
auto baseDir = inShebang && !packages ? absPath(dirOf(script)) : i;
|
||||
|
||||
if (fromArgs)
|
||||
exprs.push_back(state->parseExprFromString(std::move(i), state->rootPath(".")));
|
||||
exprs.push_back(state->parseExprFromString(
|
||||
std::move(i),
|
||||
inShebang ? lookupFileArg(*state, baseDir) : state->rootPath(".")
|
||||
));
|
||||
else {
|
||||
auto absolute = i;
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue