Skip to content

Commit 5d3234e

Browse files
committed
Only upcase x64 platform
The JAVA_HOME_* variables use 'arm64' on ARM.
1 parent 745e010 commit 5d3234e

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

common.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,11 @@ export function setupPath(newPathEntries) {
406406

407407
export function setupJavaHome() {
408408
core.startGroup(`Modifying JAVA_HOME for JRuby`)
409-
let newHomeVar = `JAVA_HOME_21_${os.arch().toUpperCase()}`;
409+
let arch = os.arch().toUpperCase();
410+
if (arch == "x64") {
411+
arch = "X64"
412+
}
413+
let newHomeVar = `JAVA_HOME_21_${arch}`;
410414
let newHome = process.env[newHomeVar];
411415
console.log(`Setting JAVA_HOME to ${newHomeVar} path ${newHome}`)
412416
core.exportVariable("JAVA_HOME", newHome);

dist/index.js

+5-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)