Fix GraalVM for JDK 17+ detection in MSVC feature.

Fixes #88
This commit is contained in:
Fabio Niephaus
2024-03-11 22:34:51 +01:00
committed by Fabio Niephaus
parent 5393c3d809
commit b03aef7455
3 changed files with 16 additions and 21 deletions

View File

@@ -30,18 +30,13 @@ function findVcvarsallPath(): string {
export function setUpWindowsEnvironment(
javaVersion: string,
graalVMVersion: string
graalVMVersion: string,
isGraalVMforJDK17OrLater: boolean
): void {
if (javaVersion === javaVersion || graalVMVersion === VERSION_DEV) {
return // no longer required in dev builds
}
const javaVersionSemVer = semver.coerce(javaVersion)
if (
javaVersionSemVer &&
semver.valid(javaVersionSemVer) &&
semver.gte(javaVersionSemVer, '18.0.0')
) {
return // no longer required in GraalVM for JDK 17 and later. JDK 17 builds from 22.3 still need this, so skip 17.X.X
} else if (isGraalVMforJDK17OrLater) {
return // no longer required in GraalVM for JDK 17 and later.
}
core.startGroup('Updating Windows environment...')