This commit is contained in:
Arne Jørgensen 2026-08-19 12:12:22 -05:00 committed by GitHub
commit a6bde20ba5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 242 additions and 20 deletions

5
dist/setup/index.js vendored
View file

@ -43813,7 +43813,8 @@ async function findMatch(versionSpec, arch = external_os_default().arch(), dlUrl
const candidate = candidates[i];
const version = makeSemver(candidate.version);
core_debug(`check ${version} satisfies ${versionSpec}`);
if (node_modules_semver.satisfies(version, versionSpec)) {
if (candidate.version.replace(/^go/, '') === versionSpec ||
node_modules_semver.satisfies(version, versionSpec)) {
goFile = candidate.files.find(file => {
core_debug(`${file.arch}===${archFilter} && ${file.os}===${platFilter}`);
return file.arch === archFilter && file.os === platFilter;
@ -43869,7 +43870,7 @@ function parseGoVersionFile(versionFilePath) {
}
}
// go directive: https://go.dev/ref/mod#go-mod-file-go
const matchGo = contents.match(/^go (\d+(\.\d+)*)/m);
const matchGo = contents.match(/^go (\d+(\.\d+)*(?:\.\d+|(beta|rc)\d+)?)/m);
return matchGo ? matchGo[1] : '';
}
else if (external_path_.basename(versionFilePath) === '.tool-versions') {