5
0
mirror of https://github.com/astral-sh/setup-uv.git synced 2025-12-21 11:01:40 +00:00

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
6 changed files with 63 additions and 2 deletions

2
dist/setup/index.js generated vendored
View File

@@ -125910,7 +125910,7 @@ function getUvVersionFromRequirementsFile(filePath) {
function getUvVersionFromAllDependencies(allDependencies) {
return allDependencies
.find((dep) => dep.match(/^uv[=<>~!]/))
?.match(/^uv([=<>~!]+.*)$/)?.[1]
?.match(/^uv([=<>~!]+\S*)/)?.[1]
.trim();
}
function parsePyprojectDependencies(pyprojectContent) {