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

Return instead of throw RestrictedPathError

This commit is contained in:
Eelco Dolstra 2024-09-25 14:32:39 +02:00
parent be7dac494f
commit fc3f70cd5e

View file

@ -258,7 +258,7 @@ EvalState::EvalState(
settings.restrictEval || settings.pureEval
? ref<SourceAccessor>(AllowListSourceAccessor::create(getFSSourceAccessor(), {}, {},
[&settings](const CanonPath & path) -> RestrictedPathError {
throw RestrictedPathError(
return RestrictedPathError(
std::string("access to absolute path '%1%' is forbidden ") +
(settings.pureEval
? "in pure evaluation mode (use '--impure' to override)"