mirror of
https://github.com/actions/setup-python.git
synced 2025-04-24 07:22:14 +00:00
update regex
This commit is contained in:
parent
b79caba6bd
commit
80c5969e70
2 changed files with 2 additions and 4 deletions
2
dist/setup/index.js
vendored
2
dist/setup/index.js
vendored
|
@ -100694,7 +100694,7 @@ function getVersionInputFromToolVersions(versionFile) {
|
||||||
if (line.trim().startsWith('#')) {
|
if (line.trim().startsWith('#')) {
|
||||||
continue;
|
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) {
|
if (match) {
|
||||||
return [((_a = match.groups) === null || _a === void 0 ? void 0 : _a.version.trim()) || ''];
|
return [((_a = match.groups) === null || _a === void 0 ? void 0 : _a.version.trim()) || ''];
|
||||||
}
|
}
|
||||||
|
|
|
@ -297,9 +297,7 @@ export function getVersionInputFromToolVersions(versionFile: string): string[] {
|
||||||
if (line.trim().startsWith('#')) {
|
if (line.trim().startsWith('#')) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const match = line.match(
|
const match = line.match(/^\s*python\s*v?\s*(?<version>[^\s]+)\s*$/);
|
||||||
/^\s*python\s*v?(?<version>[^\s]+(?:\s*[-<>=!]+[^\s]+)*)\s*(-\s([^\s].*))?\s*$/
|
|
||||||
);
|
|
||||||
if (match) {
|
if (match) {
|
||||||
return [match.groups?.version.trim() || ''];
|
return [match.groups?.version.trim() || ''];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue