From e71bd5d9605b4050f02698a39392521d8d9120f7 Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Tue, 23 Jun 2020 11:18:41 +0300 Subject: [PATCH] add debug line --- dist/index.js | 10 +++------- src/installer.ts | 11 +++-------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/dist/index.js b/dist/index.js index 44e39d98f..29df83aeb 100644 --- a/dist/index.js +++ b/dist/index.js @@ -6939,7 +6939,7 @@ function getGo(versionSpec, stable, auth) { let osArch = os_1.default.arch(); // check cache let toolPath; - toolPath = tc.find('go', versionSpec); + toolPath = tc.find('go', makeSemver(versionSpec)); // If not found in cache, download if (toolPath) { console.log(`Found in cache @ ${toolPath}`); @@ -6952,7 +6952,8 @@ function getGo(versionSpec, stable, auth) { // Try download from internal distribution (popular versions only) // try { - info = yield getInfoFromManifest(versionSpec, stable, auth); + info = yield getInfoFromManifest(makeSemver(versionSpec), stable, auth); + console.log(`info is ${info}`); if (info) { console.log(`Acquiring ${info.resolvedVersion} from ${info.downloadUrl}`); downloadPath = yield installGoVersion(info, auth); @@ -6994,11 +6995,6 @@ function getGo(versionSpec, stable, auth) { exports.getGo = getGo; function installGoVersion(info, auth) { return __awaiter(this, void 0, void 0, function* () { - const localPath = tc.find('go', info.resolvedVersion); - if (localPath) { - console.log(`Found in cache @ ${localPath}`); - return localPath; - } console.log(`Acquiring ${info.resolvedVersion} from ${info.downloadUrl}`); const downloadPath = yield tc.downloadTool(info.downloadUrl, undefined, auth); console.log('Extracting Go...'); diff --git a/src/installer.ts b/src/installer.ts index ab9bd3db3..5d2826e0a 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -35,7 +35,7 @@ export async function getGo( // check cache let toolPath: string; - toolPath = tc.find('go', versionSpec); + toolPath = tc.find('go', makeSemver(versionSpec)); // If not found in cache, download if (toolPath) { @@ -50,7 +50,8 @@ export async function getGo( // Try download from internal distribution (popular versions only) // try { - info = await getInfoFromManifest(versionSpec, stable, auth); + info = await getInfoFromManifest(makeSemver(versionSpec), stable, auth); + console.log(`info is ${info}`); if (info) { console.log(`Acquiring ${info.resolvedVersion} from ${info.downloadUrl}`); downloadPath = await installGoVersion(info, auth); @@ -100,12 +101,6 @@ async function installGoVersion( info: IGoVersionInfo, auth: string | undefined ): Promise { - const localPath = tc.find('go', info.resolvedVersion); - if (localPath) { - console.log(`Found in cache @ ${localPath}`); - return localPath; - } - console.log(`Acquiring ${info.resolvedVersion} from ${info.downloadUrl}`); const downloadPath = await tc.downloadTool(info.downloadUrl, undefined, auth);