mirror of
https://github.com/graalvm/setup-graalvm.git
synced 2024-10-12 05:59:58 +08:00
parent
a2b35c9a1c
commit
7652cc43b3
BIN
dist/main/index.js
generated
vendored
BIN
dist/main/index.js
generated
vendored
Binary file not shown.
@ -31,7 +31,7 @@ async function run(): Promise<void> {
|
||||
const enableNativeImageMusl = core.getInput(c.INPUT_NI_MUSL) === 'true'
|
||||
|
||||
if (c.IS_WINDOWS) {
|
||||
setUpWindowsEnvironment(graalVMVersion)
|
||||
setUpWindowsEnvironment(javaVersion, graalVMVersion)
|
||||
}
|
||||
await setUpDependencies(components)
|
||||
if (enableNativeImageMusl) {
|
||||
|
16
src/msvc.ts
16
src/msvc.ts
@ -1,4 +1,5 @@
|
||||
import * as core from '@actions/core'
|
||||
import * as semver from 'semver'
|
||||
import {execSync} from 'child_process'
|
||||
import {existsSync} from 'fs'
|
||||
import {VERSION_DEV} from './constants'
|
||||
@ -27,10 +28,21 @@ function findVcvarsallPath(): string {
|
||||
throw new Error('Failed to find vcvarsall.bat')
|
||||
}
|
||||
|
||||
export function setUpWindowsEnvironment(graalVMVersion: string): void {
|
||||
if (graalVMVersion === VERSION_DEV) {
|
||||
export function setUpWindowsEnvironment(
|
||||
javaVersion: string,
|
||||
graalVMVersion: string
|
||||
): 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
|
||||
}
|
||||
|
||||
core.startGroup('Updating Windows environment...')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user