1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-11 19:41:04 +01:00

coerceToStorePath(): Improve error message

This commit is contained in:
Eelco Dolstra 2025-02-06 22:08:48 +01:00
parent 92bf150b1c
commit 3751c06fe1

View file

@ -2441,7 +2441,7 @@ StorePath EvalState::coerceToStorePath(const PosIdx pos, Value & v, NixStringCon
auto path = coerceToString(pos, v, context, errorCtx, false, false, true).toOwned(); auto path = coerceToString(pos, v, context, errorCtx, false, false, true).toOwned();
if (auto storePath = store->maybeParseStorePath(path)) if (auto storePath = store->maybeParseStorePath(path))
return *storePath; return *storePath;
error<EvalError>("path '%1%' is not in the Nix store", path).withTrace(pos, errorCtx).debugThrow(); error<EvalError>("cannoet coerce '%s' to a store path because it's not in the Nix store", path).withTrace(pos, errorCtx).debugThrow();
} }