add log for downloading

This commit is contained in:
stCarolas 2019-12-07 16:17:46 +03:00
parent b25fe559e1
commit c94f9216c7

View File

@ -32,16 +32,17 @@ export async function getMaven(version: string) {
} }
async function downloadMaven(version: string): Promise<string> { async function downloadMaven(version: string): Promise<string> {
const toolDirectoryName = 'apache-maven-${version}'; const toolDirectoryName = `apache-maven-${version}`
const downloadUrl = 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 { try {
const downloadPath = await tc.downloadTool(downloadUrl); const downloadPath = await tc.downloadTool(downloadUrl)
const extractedPath = await tc.extractTar(downloadPath); const extractedPath = await tc.extractTar(downloadPath)
let toolRoot = path.join(extractedPath, toolDirectoryName); let toolRoot = path.join(extractedPath, toolDirectoryName)
return await tc.cacheDir(toolRoot, 'maven', version); return await tc.cacheDir(toolRoot, 'maven', version)
} catch (err) { } catch (err) {
throw err; throw err
} }
} }