mirror of
https://github.com/astral-sh/setup-uv.git
synced 2026-08-09 07:00:31 +02:00
Ignore deps starting with uv when finding uv version (#492)
Fixes: #489
This commit is contained in:
@@ -15,8 +15,8 @@ function getUvVersionFromAllDependencies(
|
||||
allDependencies: string[],
|
||||
): string | undefined {
|
||||
return allDependencies
|
||||
.find((dep: string) => dep.startsWith("uv"))
|
||||
?.match(/^uv([^A-Z0-9._-]+.*)$/)?.[1]
|
||||
.find((dep: string) => dep.match(/^uv[=<>~!]/))
|
||||
?.match(/^uv([=<>~!]+.*)$/)?.[1]
|
||||
.trim();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user