diff --git a/dist/setup/index.js b/dist/setup/index.js index 5e2e0df38..0f9cf0e9a 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -63403,7 +63403,10 @@ function findMatch(versionSpec, arch = os_1.default.arch()) { } if (versionSpec === utils_1.StableReleaseAlias.Stable || versionSpec === utils_1.StableReleaseAlias.OldStable) { - versionSpec = yield resolveStableVersionInput(versionSpec, undefined, arch, candidates); + const fixedCandidates = candidates.map(item => { + return Object.assign(Object.assign({}, item), { version: makeSemver(item.version) }); + }); + versionSpec = yield resolveStableVersionInput(versionSpec, undefined, arch, fixedCandidates); } let goFile; for (let i = 0; i < candidates.length; i++) { diff --git a/src/installer.ts b/src/installer.ts index 18eab5ccf..975ace211 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -272,11 +272,14 @@ export async function findMatch( versionSpec === StableReleaseAlias.Stable || versionSpec === StableReleaseAlias.OldStable ) { + const fixedCandidates = candidates.map(item => { + return {...item, version: makeSemver(item.version)}; + }); versionSpec = await resolveStableVersionInput( versionSpec, undefined, arch, - candidates as (tc.IToolRelease & IGoVersion)[] + fixedCandidates as (tc.IToolRelease & IGoVersion)[] ); }