1
0
Fork 0
mirror of https://code.forgejo.org/actions/setup-python synced 2025-06-25 03:48:01 +02: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

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() || ''];
}