Skip to content

Commit f3fa9b3

Browse files
committed
Better error message when no candidates found
1 parent 3ad8405 commit f3fa9b3

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/main/java/net/minecraftforge/java_provisioner/DiscoLocator.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,11 @@ protected void error(String message) {
125125
}
126126

127127
log("Found " + jdks.size() + " download candidates");
128+
if (jdks.isEmpty()) {
129+
String message = String.format("Failed to find any JDKs from Disco for: %s%d - %s %s", distro != null ? distro + " " : "", version, OS.current(), Disco.Arch.CURRENT);
130+
log(message);
131+
throw new JavaProvisionerException(message, logOutput());
132+
}
128133
Disco.Package pkg = jdks.get(0);
129134
log("Selected " + pkg.distribution + ": " + pkg.filename);
130135

0 commit comments

Comments
 (0)