diff --git a/dist/index.js b/dist/index.js index 2634606..36a56bb 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4742,6 +4742,7 @@ function getJava(version, arch, jdkFile, javaPackage) { toolPath = yield tc.cacheDir(jdkDir, javaPackage, getCacheVersionString(version), arch); } let extendedJavaHome = 'JAVA_HOME_' + version + '_' + arch; + extendedJavaHome = extendedJavaHome.toUpperCase().replace(/[^0-9A-Z_]/g, '_'); core.exportVariable('JAVA_HOME', toolPath); core.exportVariable(extendedJavaHome, toolPath); core.addPath(path.join(toolPath, 'bin')); diff --git a/src/installer.ts b/src/installer.ts index 487db6f..7a8feae 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -87,6 +87,7 @@ export async function getJava( } let extendedJavaHome = 'JAVA_HOME_' + version + '_' + arch; + extendedJavaHome = extendedJavaHome.toUpperCase().replace(/[^0-9A-Z_]/g, '_'); core.exportVariable('JAVA_HOME', toolPath); core.exportVariable(extendedJavaHome, toolPath); core.addPath(path.join(toolPath, 'bin'));