diff --git a/dist/index.js b/dist/index.js index 2c97db222..f4a59afc6 100644 --- a/dist/index.js +++ b/dist/index.js @@ -6944,7 +6944,8 @@ function getGo(versionSpec, stable, auth) { // If not found in cache, download if (toolPath) { console.log(`Found in cache @ ${toolPath}`); - return toolPath; + const toolcachePath = yield tc.cacheDir(toolPath, 'go', makeSemver(versionSpec)); + return toolcachePath; } console.log(`Attempting to download ${versionSpec}...`); let downloadPath = ''; diff --git a/src/installer.ts b/src/installer.ts index 7194552a4..881f329ad 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -39,11 +39,15 @@ export async function getGo( // check cache let toolPath: string; toolPath = tc.find('go', versionSpec); - // If not found in cache, download if (toolPath) { console.log(`Found in cache @ ${toolPath}`); - return toolPath; + const toolcachePath = await tc.cacheDir( + toolPath, + 'go', + makeSemver(versionSpec) + ); + return toolcachePath; } console.log(`Attempting to download ${versionSpec}...`); let downloadPath = '';