mirror of
https://github.com/astral-sh/setup-uv.git
synced 2026-04-06 10:36:53 +00:00
Merge 3261177956 into 5c62c59261
This commit is contained in:
commit
c843b152c1
2 changed files with 6 additions and 3 deletions
|
|
@ -50,7 +50,7 @@ Have a look under [Advanced Configuration](#advanced-configuration) for detailed
|
|||
# Path to a file containing the version of uv to install (default: searches uv.toml then pyproject.toml)
|
||||
version-file: ""
|
||||
|
||||
# Resolution strategy when resolving version ranges: 'highest' or 'lowest'
|
||||
# Resolution strategy when resolving version ranges: 'highest', 'lowest', or 'lowest-direct'
|
||||
resolution-strategy: "highest"
|
||||
|
||||
# The version of Python to set UV_PYTHON to
|
||||
|
|
|
|||
|
|
@ -240,8 +240,11 @@ function getManifestFile(): string | undefined {
|
|||
return undefined;
|
||||
}
|
||||
|
||||
function getResolutionStrategy(): "highest" | "lowest" {
|
||||
function getResolutionStrategy(): "highest" | "lowest" | "lowest-direct" {
|
||||
const resolutionStrategyInput = core.getInput("resolution-strategy");
|
||||
if (resolutionStrategyInput === "lowest-direct") {
|
||||
return "lowest-direct";
|
||||
}
|
||||
if (resolutionStrategyInput === "lowest") {
|
||||
return "lowest";
|
||||
}
|
||||
|
|
@ -249,6 +252,6 @@ function getResolutionStrategy(): "highest" | "lowest" {
|
|||
return "highest";
|
||||
}
|
||||
throw new Error(
|
||||
`Invalid resolution-strategy: ${resolutionStrategyInput}. Must be 'highest' or 'lowest'.`,
|
||||
`Invalid resolution-strategy: ${resolutionStrategyInput}. Must be 'highest', 'lowest', or 'lowest-direct'.`,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue