Skip to content

Commit

Permalink
Partial fix for #595 - Add explicit check for java binary
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Stryker <[email protected]>
  • Loading branch information
robstryker committed Apr 1, 2024
1 parent 33105d3 commit bb3d7f3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/impl/requirements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ async function checkJavaRuntime(): Promise<string | RspRequirementsRejection> {
if (!pathExists.sync(javaHome)) {
return getRejectionWithDownloadUrl(`${source} points to a missing folder`);
}
if (!pathExists.sync(path.resolve(javaHome, 'bin', JAVA_FILENAME))) {
return getRejectionWithDownloadUrl(`${source} does not point to a JDK. The '${JAVA_FILENAME}' command is missing.`);
}
if (!pathExists.sync(path.resolve(javaHome, 'bin', JAVAC_FILENAME))) {
return getRejectionWithDownloadUrl(`${source} does not point to a JDK. The '${JAVAC_FILENAME}' command is missing.`);
}
Expand Down

0 comments on commit bb3d7f3

Please sign in to comment.