diff --git a/dist/setup/index.js b/dist/setup/index.js index 088addf5..66483e78 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -100694,7 +100694,7 @@ function getVersionInputFromToolVersions(versionFile) { if (line.trim().startsWith('#')) { continue; } - const match = line.match(/^\s*python\s*v?(?[^\s]+(?:\s*[-<>=!]+[^\s]+)*)\s*(-\s([^\s].*))?\s*$/); + const match = line.match(/^\s*python\s*v?\s*(?[^\s]+)\s*$/); if (match) { return [((_a = match.groups) === null || _a === void 0 ? void 0 : _a.version.trim()) || '']; } diff --git a/src/utils.ts b/src/utils.ts index 1019e582..fde719e3 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -297,9 +297,7 @@ export function getVersionInputFromToolVersions(versionFile: string): string[] { if (line.trim().startsWith('#')) { continue; } - const match = line.match( - /^\s*python\s*v?(?[^\s]+(?:\s*[-<>=!]+[^\s]+)*)\s*(-\s([^\s].*))?\s*$/ - ); + const match = line.match(/^\s*python\s*v?\s*(?[^\s]+)\s*$/); if (match) { return [match.groups?.version.trim() || '']; }