diff --git a/dist/setup/index.js b/dist/setup/index.js index b1fe2ca..0864b68 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -63596,10 +63596,10 @@ function run() { core.info('Setting GOROOT for Go version < 1.9'); core.exportVariable('GOROOT', installDir); } - const added = yield addBinToPath(); - core.debug(`add bin ${added}`); - core.info(`Successfully set up Go version ${versionSpec}`); } + const added = yield addBinToPath(); + core.debug(`add bin ${added}`); + core.info(`Successfully set up Go version ${versionSpec}`); const goPath = yield io.which('go'); const goVersion = (child_process_1.default.execSync(`${goPath} version`) || '').toString(); if (cache && cache_utils_1.isCacheFeatureAvailable()) { diff --git a/src/main.ts b/src/main.ts index 82fc540..5c76f70 100644 --- a/src/main.ts +++ b/src/main.ts @@ -50,12 +50,12 @@ export async function run() { core.info('Setting GOROOT for Go version < 1.9'); core.exportVariable('GOROOT', installDir); } - - const added = await addBinToPath(); - core.debug(`add bin ${added}`); - core.info(`Successfully set up Go version ${versionSpec}`); } + const added = await addBinToPath(); + core.debug(`add bin ${added}`); + core.info(`Successfully set up Go version ${versionSpec}`); + const goPath = await io.which('go'); const goVersion = (cp.execSync(`${goPath} version`) || '').toString();