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 } }