Skip to content

Commit bb3d7f3

Browse files
committed
Partial fix for #595 - Add explicit check for java binary
Signed-off-by: Rob Stryker <rob@oxbeef.net>
1 parent 33105d3 commit bb3d7f3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/impl/requirements.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ async function checkJavaRuntime(): Promise<string | RspRequirementsRejection> {
101101
if (!pathExists.sync(javaHome)) {
102102
return getRejectionWithDownloadUrl(`${source} points to a missing folder`);
103103
}
104+
if (!pathExists.sync(path.resolve(javaHome, 'bin', JAVA_FILENAME))) {
105+
return getRejectionWithDownloadUrl(`${source} does not point to a JDK. The '${JAVA_FILENAME}' command is missing.`);
106+
}
104107
if (!pathExists.sync(path.resolve(javaHome, 'bin', JAVAC_FILENAME))) {
105108
return getRejectionWithDownloadUrl(`${source} does not point to a JDK. The '${JAVAC_FILENAME}' command is missing.`);
106109
}

0 commit comments

Comments
 (0)