fix(linux): support CachyOS Hopper hosts

This commit is contained in:
Namnarak
2026-10-07 20:14:38 +07:00
parent a65755728f
commit f7a5b66df2
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -59,6 +59,7 @@ describe("Linux Hopper host classification", () => {
['ID=ubuntu\nVERSION_ID="24.04"\n', "deb"],
["ID=fedora\nVERSION_ID=41\n", "rpm"],
["ID=arch\n", "arch"],
["ID=cachyos\nID_LIKE=arch\n", "arch"],
] as const)("accepts an official Hopper distribution", (document, family) => {
expect(parseLinuxDistribution(document)).toMatchObject({
packageFamily: family,
@@ -88,6 +89,8 @@ describe("Linux Hopper host classification", () => {
'ID=ubuntu\nVERSION_ID="22.04"\n',
"ID=fedora\nVERSION_ID=40\n",
'ID=debian\nVERSION_ID="13"\nID_LIKE=debian\n',
"ID=manjaro\nID_LIKE=arch\n",
"ID=garuda\nID_LIKE=arch\n",
])("rejects unsupported vendor/version combinations", (document) => {
expect(parseLinuxDistribution(document).supported).toBe(false);
});
+1
View File
@@ -150,6 +150,7 @@ export const parseLinuxDistribution = (text: string): LinuxDistribution => {
const supported =
packageFamily !== undefined &&
(id === "arch" ||
id === "cachyos" ||
(id === "ubuntu" && versionAtLeast(versionId, 24)) ||
(id === "fedora" && versionAtLeast(versionId, 41)));
const identity = {