1
0
Fork 0
mirror of https://code.forgejo.org/actions/setup-python synced 2025-03-14 22:26:58 +01:00

update regex

This commit is contained in:
mahabaleshwars 2025-02-27 19:49:49 +05:30
parent b79caba6bd
commit 80c5969e70
2 changed files with 2 additions and 4 deletions

2
dist/setup/index.js vendored
View file

@ -100694,7 +100694,7 @@ function getVersionInputFromToolVersions(versionFile) {
if (line.trim().startsWith('#')) {
continue;
}
const match = line.match(/^\s*python\s*v?(?<version>[^\s]+(?:\s*[-<>=!]+[^\s]+)*)\s*(-\s([^\s].*))?\s*$/);
const match = line.match(/^\s*python\s*v?\s*(?<version>[^\s]+)\s*$/);
if (match) {
return [((_a = match.groups) === null || _a === void 0 ? void 0 : _a.version.trim()) || ''];
}

View file

@ -297,9 +297,7 @@ export function getVersionInputFromToolVersions(versionFile: string): string[] {
if (line.trim().startsWith('#')) {
continue;
}
const match = line.match(
/^\s*python\s*v?(?<version>[^\s]+(?:\s*[-<>=!]+[^\s]+)*)\s*(-\s([^\s].*))?\s*$/
);
const match = line.match(/^\s*python\s*v?\s*(?<version>[^\s]+)\s*$/);
if (match) {
return [match.groups?.version.trim() || ''];
}