1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

nix: Add command baseDir to parse --expr relative to shebang script

This commit is contained in:
Robert Hensing 2023-05-12 19:54:54 +02:00 committed by tomberek
parent 20ff61ab25
commit 198bc22e3b
5 changed files with 51 additions and 1 deletions

View file

@ -445,7 +445,8 @@ Installables SourceExprCommand::parseInstallables(
else if (file)
state->evalFile(lookupFileArg(*state, *file), *vFile);
else {
auto e = state->parseExprFromString(*expr, state->rootPath(CanonPath::fromCwd()));
CanonPath dir(CanonPath::fromCwd(getCommandBaseDir()));
auto e = state->parseExprFromString(*expr, state->rootPath(dir));
state->eval(e, *vFile);
}