mirror of
https://gitea.com/actions/setup-java.git
synced 2025-04-24 01:26:52 +08:00
Fix
This commit is contained in:
parent
55f787ebb1
commit
9f0c2dfa0d
@ -49,10 +49,13 @@ function getJava(version, arch, jdkFile) {
|
||||
else {
|
||||
let compressedFileExtension = '';
|
||||
if (!jdkFile) {
|
||||
core.debug('Downloading Jdk from Azul');
|
||||
jdkFile = yield downloadJava(version);
|
||||
compressedFileExtension = IS_WINDOWS ? '.zip' : '.tar.gz';
|
||||
}
|
||||
core.debug('Retrieving Jdk from local path');
|
||||
else {
|
||||
core.debug('Retrieving Jdk from local path');
|
||||
}
|
||||
compressedFileExtension = compressedFileExtension || getFileEnding(jdkFile);
|
||||
let tempDir = path.join(tempDirectory, 'temp_' + Math.floor(Math.random() * 2000000000));
|
||||
const jdkDir = yield unzipJavaDownload(jdkFile, compressedFileExtension, tempDir);
|
||||
|
@ -37,10 +37,12 @@ export async function getJava(
|
||||
} else {
|
||||
let compressedFileExtension = '';
|
||||
if (!jdkFile) {
|
||||
core.debug('Downloading Jdk from Azul');
|
||||
jdkFile = await downloadJava(version);
|
||||
compressedFileExtension = IS_WINDOWS ? '.zip' : '.tar.gz';
|
||||
} else {
|
||||
core.debug('Retrieving Jdk from local path');
|
||||
}
|
||||
core.debug('Retrieving Jdk from local path');
|
||||
compressedFileExtension = compressedFileExtension || getFileEnding(jdkFile);
|
||||
let tempDir: string = path.join(
|
||||
tempDirectory,
|
||||
|
Loading…
x
Reference in New Issue
Block a user