mirror of
https://github.com/NixOS/nix
synced 2025-06-27 16:51:15 +02:00
nix: Parse --file relative to shebang script
This commit is contained in:
parent
198bc22e3b
commit
466271568b
3 changed files with 24 additions and 3 deletions
|
@ -442,8 +442,9 @@ Installables SourceExprCommand::parseInstallables(
|
|||
auto e = state->parseStdin();
|
||||
state->eval(e, *vFile);
|
||||
}
|
||||
else if (file)
|
||||
state->evalFile(lookupFileArg(*state, *file), *vFile);
|
||||
else if (file) {
|
||||
state->evalFile(lookupFileArg(*state, *file, CanonPath::fromCwd(getCommandBaseDir())), *vFile);
|
||||
}
|
||||
else {
|
||||
CanonPath dir(CanonPath::fromCwd(getCommandBaseDir()));
|
||||
auto e = state->parseExprFromString(*expr, state->rootPath(dir));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue