Merge pull request #9626 from jvns/locked-input

Make fetchTree locked input error message clearer
This commit is contained in:
John Ericson 2024-01-22 09:31:59 -05:00 committed by GitHub
commit 176dcd5c61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -175,7 +175,10 @@ static void fetchTree(
input = lookupInRegistries(state.store, input).first;
if (evalSettings.pureEval && !input.isLocked())
state.debugThrowLastTrace(EvalError("in pure evaluation mode, 'fetchTree' requires a locked input, at %s", state.positions[pos]));
if (params.isFetchGit)
state.debugThrowLastTrace(EvalError("in pure evaluation mode, 'fetchGit' requires a locked input, at %s", state.positions[pos]));
else
state.debugThrowLastTrace(EvalError("in pure evaluation mode, 'fetchTree' requires a locked input, at %s", state.positions[pos]));
state.checkURI(input.toURLString());