Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Jared Petersen
2020-06-23 20:54:13 -07:00
10 changed files with 5191 additions and 53 deletions

View File

@ -72,9 +72,17 @@ export async function getJava(
}
let extendedJavaHome = 'JAVA_HOME_' + version + '_' + arch;
core.exportVariable(extendedJavaHome, toolPath); //TODO: remove for v2
// For portability reasons environment variables should only consist of
// uppercase letters, digits, and the underscore. Therefore we convert
// the extendedJavaHome variable to upper case and replace '.' symbols and
// any other non-alphanumeric characters with an underscore.
extendedJavaHome = extendedJavaHome.toUpperCase().replace(/[^0-9A-Z_]/g, '_');
core.exportVariable('JAVA_HOME', toolPath);
core.exportVariable(extendedJavaHome, toolPath);
core.addPath(path.join(toolPath, 'bin'));
core.setOutput('path', toolPath);
core.setOutput('version', version);
}
function getCacheVersionString(version: string) {