Ignore backslashes and whitespace in requirements (#501)

setup-uv gets confused when there are backslashes in `requirements.txt`.
This changes the regex to ignore backslashes.

---------

Co-authored-by: axm2 <>
This commit is contained in:
axm2 2025-07-26 09:19:52 -04:00 committed by GitHub
parent 4fb0c07c55
commit 43f37368c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 63 additions and 2 deletions

View file

@ -16,7 +16,7 @@ function getUvVersionFromAllDependencies(
): string | undefined {
return allDependencies
.find((dep: string) => dep.match(/^uv[=<>~!]/))
?.match(/^uv([=<>~!]+.*)$/)?.[1]
?.match(/^uv([=<>~!]+\S*)/)?.[1]
.trim();
}