Change error messages about 'invalid paths' to 'path does not exist'.

Fixes #270.

Change-Id: I07d2da41498cfdf324a03af40533044d58c97c7e
This commit is contained in:
julia
2024-06-16 03:55:39 +00:00
parent 6c311a4afa
commit 89c782b0c0
5 changed files with 9 additions and 8 deletions
+2 -1
View File
@@ -383,7 +383,8 @@ void prim_exec(EvalState & state, const PosIdx pos, Value * * args, Value & v)
try {
auto _ = state.realiseContext(context); // FIXME: Handle CA derivations
} catch (InvalidPathError & e) {
state.error<EvalError>("cannot execute '%1%', since path '%2%' is not valid", program, e.path).atPos(pos).debugThrow();
e.addTrace(state.positions[pos], "while realising the context for builtins.exec");
throw;
}
auto output = runProgram(program, true, commandArgs);