mirror of
https://github.com/actions/setup-java.git
synced 2025-05-21 09:51:47 +00:00
Clean up
This commit is contained in:
parent
1b833f3f3a
commit
dfc3d5fd77
@ -55,12 +55,7 @@ function getJava(version, arch, jdkFile) {
|
||||
let contents = yield (yield http.get('https://static.azul.com/zulu/bin/')).readBody();
|
||||
let refs = contents.match(/<a href.*\">/gi) || [];
|
||||
const downloadInfo = getDownloadInfo(refs, version);
|
||||
try {
|
||||
jdkFile = yield tc.downloadTool(downloadInfo.url);
|
||||
}
|
||||
catch (_a) {
|
||||
throw Error(downloadInfo.url);
|
||||
}
|
||||
jdkFile = yield tc.downloadTool(downloadInfo.url);
|
||||
version = downloadInfo.version;
|
||||
compressedFileExtension = IS_WINDOWS ? '.zip' : '.tar.gz';
|
||||
}
|
||||
|
@ -47,11 +47,7 @@ export async function getJava(
|
||||
|
||||
const downloadInfo = getDownloadInfo(refs, version);
|
||||
|
||||
try {
|
||||
jdkFile = await tc.downloadTool(downloadInfo.url);
|
||||
} catch {
|
||||
throw Error(downloadInfo.url);
|
||||
}
|
||||
jdkFile = await tc.downloadTool(downloadInfo.url);
|
||||
version = downloadInfo.version;
|
||||
compressedFileExtension = IS_WINDOWS ? '.zip' : '.tar.gz';
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user