mirror of
https://github.com/astral-sh/setup-uv.git
synced 2026-02-19 15:31:43 +00:00
fix buglet
This commit is contained in:
parent
e2d03b96c6
commit
57ffc3e80a
1 changed files with 6 additions and 4 deletions
|
|
@ -141,23 +141,25 @@ export async function resolveVersion(
|
||||||
let version: string;
|
let version: string;
|
||||||
const isSimpleMinimumVersionSpecifier =
|
const isSimpleMinimumVersionSpecifier =
|
||||||
versionInput.includes(">") && !versionInput.includes(",");
|
versionInput.includes(">") && !versionInput.includes(",");
|
||||||
if (isSimpleMinimumVersionSpecifier) {
|
const resolveSpeciferToLatest =
|
||||||
|
isSimpleMinimumVersionSpecifier && resolutionStrategy === "highest";
|
||||||
|
if (resolveSpeciferToLatest) {
|
||||||
core.info("Found minimum version specifier, using latest version");
|
core.info("Found minimum version specifier, using latest version");
|
||||||
}
|
}
|
||||||
if (manifestFile) {
|
if (manifestFile) {
|
||||||
version =
|
version =
|
||||||
versionInput === "latest" || isSimpleMinimumVersionSpecifier
|
versionInput === "latest" || resolveSpeciferToLatest
|
||||||
? await getLatestVersionInManifest(manifestFile)
|
? await getLatestVersionInManifest(manifestFile)
|
||||||
: versionInput;
|
: versionInput;
|
||||||
} else {
|
} else {
|
||||||
version =
|
version =
|
||||||
versionInput === "latest" || isSimpleMinimumVersionSpecifier
|
versionInput === "latest" || resolveSpeciferToLatest
|
||||||
? await getLatestVersion(githubToken)
|
? await getLatestVersion(githubToken)
|
||||||
: versionInput;
|
: versionInput;
|
||||||
}
|
}
|
||||||
if (tc.isExplicitVersion(version)) {
|
if (tc.isExplicitVersion(version)) {
|
||||||
core.debug(`Version ${version} is an explicit version.`);
|
core.debug(`Version ${version} is an explicit version.`);
|
||||||
if (isSimpleMinimumVersionSpecifier) {
|
if (resolveSpeciferToLatest) {
|
||||||
if (!pep440.satisfies(version, versionInput)) {
|
if (!pep440.satisfies(version, versionInput)) {
|
||||||
throw new Error(`No version found for ${versionInput}`);
|
throw new Error(`No version found for ${versionInput}`);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue