mirror of
https://github.com/NixOS/nix.git
synced 2024-11-26 08:42:30 +00:00
Merge pull request #4751 from Ma27/storepath-pos
primops/storePath: add trace to pure mode error
This commit is contained in:
commit
e3e78ee2a2
@ -1251,7 +1251,10 @@ static RegisterPrimOp primop_toPath({
|
||||
static void prim_storePath(EvalState & state, const Pos & pos, Value * * args, Value & v)
|
||||
{
|
||||
if (evalSettings.pureEval)
|
||||
throw EvalError("builtins.storePath' is not allowed in pure evaluation mode");
|
||||
throw EvalError({
|
||||
.msg = hintfmt("'%s' is not allowed in pure evaluation mode", "builtins.storePath"),
|
||||
.errPos = pos
|
||||
});
|
||||
|
||||
PathSet context;
|
||||
Path path = state.checkSourcePath(state.coerceToPath(pos, *args[0], context));
|
||||
|
Loading…
Reference in New Issue
Block a user