fix(linux): support CachyOS Hopper hosts
This commit is contained in:
@@ -59,6 +59,7 @@ describe("Linux Hopper host classification", () => {
|
|||||||
['ID=ubuntu\nVERSION_ID="24.04"\n', "deb"],
|
['ID=ubuntu\nVERSION_ID="24.04"\n', "deb"],
|
||||||
["ID=fedora\nVERSION_ID=41\n", "rpm"],
|
["ID=fedora\nVERSION_ID=41\n", "rpm"],
|
||||||
["ID=arch\n", "arch"],
|
["ID=arch\n", "arch"],
|
||||||
|
["ID=cachyos\nID_LIKE=arch\n", "arch"],
|
||||||
] as const)("accepts an official Hopper distribution", (document, family) => {
|
] as const)("accepts an official Hopper distribution", (document, family) => {
|
||||||
expect(parseLinuxDistribution(document)).toMatchObject({
|
expect(parseLinuxDistribution(document)).toMatchObject({
|
||||||
packageFamily: family,
|
packageFamily: family,
|
||||||
@@ -88,6 +89,8 @@ describe("Linux Hopper host classification", () => {
|
|||||||
'ID=ubuntu\nVERSION_ID="22.04"\n',
|
'ID=ubuntu\nVERSION_ID="22.04"\n',
|
||||||
"ID=fedora\nVERSION_ID=40\n",
|
"ID=fedora\nVERSION_ID=40\n",
|
||||||
'ID=debian\nVERSION_ID="13"\nID_LIKE=debian\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) => {
|
])("rejects unsupported vendor/version combinations", (document) => {
|
||||||
expect(parseLinuxDistribution(document).supported).toBe(false);
|
expect(parseLinuxDistribution(document).supported).toBe(false);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -150,6 +150,7 @@ export const parseLinuxDistribution = (text: string): LinuxDistribution => {
|
|||||||
const supported =
|
const supported =
|
||||||
packageFamily !== undefined &&
|
packageFamily !== undefined &&
|
||||||
(id === "arch" ||
|
(id === "arch" ||
|
||||||
|
id === "cachyos" ||
|
||||||
(id === "ubuntu" && versionAtLeast(versionId, 24)) ||
|
(id === "ubuntu" && versionAtLeast(versionId, 24)) ||
|
||||||
(id === "fedora" && versionAtLeast(versionId, 41)));
|
(id === "fedora" && versionAtLeast(versionId, 41)));
|
||||||
const identity = {
|
const identity = {
|
||||||
|
|||||||
Reference in New Issue
Block a user