mirror of
https://github.com/astral-sh/setup-uv.git
synced 2026-06-28 10:45:08 +00:00
fix: use BUILD_ID as backup for determining os version
This commit is contained in:
parent
21d5da3bc3
commit
c13b534803
2 changed files with 9 additions and 1 deletions
4
dist/setup/index.cjs
generated
vendored
4
dist/setup/index.cjs
generated
vendored
|
|
@ -91160,12 +91160,16 @@ function getLinuxOSNameVersion() {
|
|||
const id = parseOsReleaseValue(content, "ID");
|
||||
const versionId2 = parseOsReleaseValue(content, "VERSION_ID");
|
||||
const versionCodename = parseOsReleaseValue(content, "VERSION_CODENAME");
|
||||
const buildId = parseOsReleaseValue(content, "BUILD_ID");
|
||||
if (id && versionId2) {
|
||||
return `${id}-${versionId2}`;
|
||||
}
|
||||
if (id && versionCodename) {
|
||||
return `${id}-${versionCodename}`;
|
||||
}
|
||||
if (id && buildId) {
|
||||
return `${id}-${buildId}`;
|
||||
}
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -109,8 +109,9 @@ function getLinuxOSNameVersion(): string {
|
|||
const id = parseOsReleaseValue(content, "ID");
|
||||
const versionId = parseOsReleaseValue(content, "VERSION_ID");
|
||||
// Fallback for rolling releases (debian:unstable/testing, arch, etc.)
|
||||
// that don't have VERSION_ID but have VERSION_CODENAME
|
||||
// that don't have VERSION_ID but have VERSION_CODENAME or BUILD_ID
|
||||
const versionCodename = parseOsReleaseValue(content, "VERSION_CODENAME");
|
||||
const buildId = parseOsReleaseValue(content, "BUILD_ID");
|
||||
|
||||
if (id && versionId) {
|
||||
return `${id}-${versionId}`;
|
||||
|
|
@ -118,6 +119,9 @@ function getLinuxOSNameVersion(): string {
|
|||
if (id && versionCodename) {
|
||||
return `${id}-${versionCodename}`;
|
||||
}
|
||||
if (id && buildId) {
|
||||
return `${id}-${buildId}`;
|
||||
}
|
||||
} catch {
|
||||
// Try next file
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue