mirror of
https://github.com/astral-sh/setup-uv.git
synced 2026-04-08 03:24:17 +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:
parent
4fb0c07c55
commit
43f37368c9
6 changed files with 63 additions and 2 deletions
|
|
@ -16,7 +16,7 @@ function getUvVersionFromAllDependencies(
|
|||
): string | undefined {
|
||||
return allDependencies
|
||||
.find((dep: string) => dep.match(/^uv[=<>~!]/))
|
||||
?.match(/^uv([=<>~!]+.*)$/)?.[1]
|
||||
?.match(/^uv([=<>~!]+\S*)/)?.[1]
|
||||
.trim();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue