This commit is contained in:
Sergey Dolin 2023-08-03 09:54:27 -04:00 committed by GitHub
commit 7b7b94dffb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

4
dist/setup/index.js vendored
View File

@ -61683,6 +61683,10 @@ function parseGoVersionFile(versionFilePath) {
const match = contents.match(/^go (\d+(\.\d+)*)/m);
return match ? match[1] : '';
}
else if (path.basename(versionFilePath) === '.tool-versions') {
const match = contents.match(/^golang\s+(\d+(\.\d+)*)/m);
return match ? match[1] : '';
}
return contents.trim();
}
exports.parseGoVersionFile = parseGoVersionFile;

View File

@ -415,6 +415,9 @@ export function parseGoVersionFile(versionFilePath: string): string {
) {
const match = contents.match(/^go (\d+(\.\d+)*)/m);
return match ? match[1] : '';
} else if (path.basename(versionFilePath) === '.tool-versions') {
const match = contents.match(/^golang\s+(\d+(\.\d+)*)/m);
return match ? match[1] : '';
}
return contents.trim();