From 96685461785314b268057aee1aca68aacdf8bb69 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 16 Apr 2024 17:45:13 +0200 Subject: [PATCH] Remove unnecessary arg highlighting --- src/libexpr/eval.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index b2d7279fd..4ac4e18db 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -397,10 +397,12 @@ EvalState::EvalState( evalSettings.restrictEval || evalSettings.pureEval ? ref(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())