From c94f9216c742258c2197e86da4d3f1cb11c551fc Mon Sep 17 00:00:00 2001 From: stCarolas Date: Sat, 7 Dec 2019 16:17:46 +0300 Subject: [PATCH] add log for downloading --- src/installer.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/installer.ts b/src/installer.ts index 2da3192..ec27faa 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -32,16 +32,17 @@ export async function getMaven(version: string) { } async function downloadMaven(version: string): Promise { - const toolDirectoryName = 'apache-maven-${version}'; + const toolDirectoryName = `apache-maven-${version}` const downloadUrl = - 'https://www-eu.apache.org/dist/maven/maven-3/${version}/binaries/${toolDirectoryName}-bin.tar.gz'; + `https://www-eu.apache.org/dist/maven/maven-3/${version}/binaries/${toolDirectoryName}-bin.tar.gz` + console.log(`downloading ${downloadUrl}`) try { - const downloadPath = await tc.downloadTool(downloadUrl); - const extractedPath = await tc.extractTar(downloadPath); - let toolRoot = path.join(extractedPath, toolDirectoryName); - return await tc.cacheDir(toolRoot, 'maven', version); + const downloadPath = await tc.downloadTool(downloadUrl) + const extractedPath = await tc.extractTar(downloadPath) + let toolRoot = path.join(extractedPath, toolDirectoryName) + return await tc.cacheDir(toolRoot, 'maven', version) } catch (err) { - throw err; + throw err } }