This commit is contained in:
Ramona T 2026-03-26 22:34:38 +00:00 committed by GitHub
commit c843b152c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View file

@ -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

View file

@ -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'.`,
);
}