Merge pull request #9829 from obsidiansystems/fix-if-if-else-ambiguity

If `if`...`if`...`else` ambiguity
This commit is contained in:
John Ericson 2024-01-22 10:58:46 -05:00 committed by GitHub
commit b74ec56da9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -174,11 +174,12 @@ static void fetchTree(
if (!evalSettings.pureEval && !input.isDirect() && experimentalFeatureSettings.isEnabled(Xp::Flakes))
input = lookupInRegistries(state.store, input).first;
if (evalSettings.pureEval && !input.isLocked())
if (evalSettings.pureEval && !input.isLocked()) {
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());