1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 19:01:16 +02:00

minor cleanup

This commit is contained in:
Ben Burdette 2022-04-08 15:46:12 -06:00
parent a86c2a8481
commit 27d45f9eb3
4 changed files with 29 additions and 34 deletions

View file

@ -226,13 +226,14 @@ static void fetch(EvalState & state, const Pos & pos, Value * * args, Value & v,
expectedHash = newHashAllowEmpty(state.forceStringNoCtx(*attr.value, *attr.pos), htSHA256);
else if (n == "name")
name = state.forceStringNoCtx(*attr.value, *attr.pos);
else {
auto e = EvalError({
.msg = hintfmt("unsupported argument '%s' to '%s'", attr.name, who),
.errPos = *attr.pos
});
state.debugLastTrace(e);
throw e;
else
{
auto e = EvalError({
.msg = hintfmt("unsupported argument '%s' to '%s'", attr.name, who),
.errPos = *attr.pos
});
state.debugLastTrace(e);
throw e;
}
}