Improve some bad stack traces.

Idk why this happens.
dev/0.11
modmuss50 2021-07-13 00:05:24 +01:00
parent f13dc4eea7
commit ad5ac78e06
1 changed files with 7 additions and 0 deletions

View File

@ -114,6 +114,13 @@ public final class LoomTasks {
project.afterEvaluate(p -> {
MappingsProviderImpl mappingsProvider = extension.getMappingsProvider();
if (mappingsProvider.mappedProvider == null) {
// If this is ever null something has gone badly wrong,
// for some reason for another this afterEvaluate still gets called when something has gone badly
// wrong, returning here seems to produce nicer errors.
return;
}
File inputJar = mappingsProvider.mappedProvider.getMappedJar();
if (mappingsProvider.hasUnpickDefinitions()) {