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:
parent
be7dac494f
commit
fc3f70cd5e
|
@ -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)"
|
||||
|
|
Loading…
Reference in a new issue