fix(update): detect active Linux libc
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
buildMiseUpgradeArgs,
|
||||
buildNpmInstallArgs,
|
||||
downloadVerifiedBinary,
|
||||
isMuslLinuxForTest,
|
||||
parseUpdateArgs,
|
||||
pruneBunInstallCache,
|
||||
replaceBinaryForUpdate,
|
||||
@@ -74,6 +75,29 @@ describe("parseUpdateArgs", () => {
|
||||
expect(parseUpdateArgs(["update", "-l"])).toEqual({ force: false, check: false, plugins: true });
|
||||
});
|
||||
});
|
||||
|
||||
describe("update-cli libc detection", () => {
|
||||
it("does not mistake an installed musl loader for a glibc host", () => {
|
||||
expect(
|
||||
isMuslLinuxForTest({
|
||||
platform: "linux",
|
||||
alpineRelease: false,
|
||||
lddOutput: "ldd (Ubuntu GLIBC 2.39-0ubuntu8.7) 2.39",
|
||||
}),
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
it("recognizes a musl host from ldd output", () => {
|
||||
expect(
|
||||
isMuslLinuxForTest({
|
||||
platform: "linux",
|
||||
alpineRelease: false,
|
||||
lddOutput: "musl libc (x86_64)",
|
||||
}),
|
||||
).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe("update-cli install target detection", () => {
|
||||
it("uses bun update when prioritized omp is inside bun global bin", () => {
|
||||
const method = resolveUpdateMethodForTest("/Users/test/.bun/bin/omp", "/Users/test/.bun/bin");
|
||||
|
||||
Reference in New Issue
Block a user