1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-10-18 00:16:11 -04:00

Remove unnecessary arg highlighting

This commit is contained in:
Eelco Dolstra 2024-04-16 17:45:13 +02:00
parent 702ca51fd2
commit 9668546178

View file

@ -397,10 +397,12 @@ EvalState::EvalState(
evalSettings.restrictEval || evalSettings.pureEval
? ref<InputAccessor>(AllowListInputAccessor::create(makeFSInputAccessor(), {}, {},
[](const CanonPath & path) -> RestrictedPathError {
auto modeInformation = evalSettings.pureEval
? "in pure evaluation mode (use '--impure' to override)"
: "in restricted mode";
throw RestrictedPathError("access to absolute path '%1%' is forbidden %2%", path, modeInformation);
throw RestrictedPathError(
std::string("access to absolute path '%1%' is forbidden ") +
(evalSettings.pureEval
? "in pure evaluation mode (use '--impure' to override)"
: "in restricted mode"),
path);
}))
: makeFSInputAccessor())
, corepkgsFS(makeMemoryInputAccessor())