Skip to content

Commit 056cbeb

Browse files
committed
DO NOT MERGE!!!
1 parent b81309c commit 056cbeb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/it/java/dev/jbang/it/BaseIT.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,12 @@ public String toStringOf(Object object) {
111111
// to use same jdk as what tetss run with to make it more
112112
// deterministic.
113113

114-
InstalledJdk jdk = jdkMan.getOrInstallJdk(testJavaMajorVersion > 0 ? testJavaMajorVersion + "" : null);
114+
InstalledJdk jdk;
115+
try {
116+
jdk = jdkMan.getOrInstallJdk(testJavaMajorVersion > 0 ? testJavaMajorVersion + "" : null);
117+
} catch (Exception e) {
118+
throw new IllegalStateException("Providers:" + jdkMan.listInstalledJdks(), e);
119+
}
115120
testJavaHome = jdk.home().toString();
116121
} else {
117122
if (!Files.exists(Paths.get(testJavaHome))) {

0 commit comments

Comments
 (0)