1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-30 06:01:00 +01:00

Fix findFile(), coerceToPath()

This commit is contained in:
Eelco Dolstra 2022-05-10 16:12:48 +02:00
parent e7f8aa8bdd
commit b4c6adfd35
13 changed files with 92 additions and 80 deletions

View file

@ -210,8 +210,7 @@ void SourceExprCommand::completeInstallable(std::string_view prefix)
Expr *e =
state->parseExprFromFile(
resolveExprPath(
state->rootPath(
lookupFileArg(*state, *file))));
lookupFileArg(*state, *file)));
Value root;
state->eval(e, root);
@ -762,7 +761,7 @@ std::vector<std::shared_ptr<Installable>> SourceExprCommand::parseInstallables(
state->eval(e, *vFile);
}
else if (file)
state->evalFile(state->rootPath(lookupFileArg(*state, *file)), *vFile);
state->evalFile(lookupFileArg(*state, *file), *vFile);
else {
auto e = state->parseExprFromString(*expr, absPath("."));
state->eval(e, *vFile);