From 6edd4406fa81c3da01a34fa6f6343087c207a568 Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Mon, 12 Dec 2022 15:45:36 +0100 Subject: [PATCH] fix log for stable aliases (#303) --- dist/setup/index.js | 3 +-- src/installer.ts | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index 7b0f1c428..fd06dc214 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -63241,6 +63241,7 @@ function getGo(versionSpec, checkLatest, auth, arch = os_1.default.arch()) { throw new Error(`Unable to find Go version '${versionSpec}' for platform ${osPlat} and architecture ${arch}.`); } } + core.info(`${versionSpec} version resolved as ${stableVersion}`); versionSpec = stableVersion; } if (checkLatest) { @@ -63507,14 +63508,12 @@ function resolveStableVersionInput(versionSpec, arch, platform, manifest) { }) .filter(item => !!item && !semver.prerelease(item)); if (versionSpec === utils_1.StableReleaseAlias.Stable) { - core.info(`stable version resolved as ${releases[0]}`); return releases[0]; } else { const versions = releases.map(release => `${semver.major(release)}.${semver.minor(release)}`); const uniqueVersions = Array.from(new Set(versions)); const oldstableVersion = releases.find(item => item.startsWith(uniqueVersions[1])); - core.info(`oldstable version resolved as ${oldstableVersion}`); return oldstableVersion; } }); diff --git a/src/installer.ts b/src/installer.ts index 3657447b3..7074f5e7b 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -60,6 +60,8 @@ export async function getGo( } } + core.info(`${versionSpec} version resolved as ${stableVersion}`); + versionSpec = stableVersion; } @@ -413,8 +415,6 @@ export async function resolveStableVersionInput( .filter(item => !!item && !semver.prerelease(item)); if (versionSpec === StableReleaseAlias.Stable) { - core.info(`stable version resolved as ${releases[0]}`); - return releases[0]; } else { const versions = releases.map( @@ -426,8 +426,6 @@ export async function resolveStableVersionInput( item.startsWith(uniqueVersions[1]) ); - core.info(`oldstable version resolved as ${oldstableVersion}`); - return oldstableVersion; } }