From 80c5969e70af2c2115eb4c2fdcd580ef82ada867 Mon Sep 17 00:00:00 2001 From: mahabaleshwars <147705296+mahabaleshwars@users.noreply.github.com> Date: Thu, 27 Feb 2025 19:49:49 +0530 Subject: [PATCH] update regex --- dist/setup/index.js | 2 +- src/utils.ts | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) 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() || '']; }