From dfc3d5fd7786635a3fc86fb40ae488ca01699f71 Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Thu, 18 Jul 2019 15:52:10 -0400 Subject: [PATCH] Clean up --- lib/installer.js | 7 +------ src/installer.ts | 6 +----- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/lib/installer.js b/lib/installer.js index 70f29f45..8fd3a272 100644 --- a/lib/installer.js +++ b/lib/installer.js @@ -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(//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'; } diff --git a/src/installer.ts b/src/installer.ts index a70689b5..a9b5f4f9 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -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 {