kagi-cli 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/install.cjs +17 -14
- package/package.json +1 -1
package/lib/install.cjs
CHANGED
|
@@ -16,26 +16,29 @@ function detectTarget() {
|
|
|
16
16
|
const os = process.platform;
|
|
17
17
|
const arch = process.arch;
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
arch === "x64" ? "x86_64" :
|
|
21
|
-
arch === "arm64" ? "aarch64" :
|
|
22
|
-
null;
|
|
23
|
-
|
|
24
|
-
if (!archPart) {
|
|
19
|
+
if (arch !== "x64" && arch !== "arm64") {
|
|
25
20
|
throw new Error(`unsupported CPU architecture for kagi: ${arch}`);
|
|
26
21
|
}
|
|
27
22
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
if (os === "linux") {
|
|
24
|
+
return `${arch === "x64" ? "x86_64" : "aarch64"}-unknown-linux-gnu`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (os === "darwin") {
|
|
28
|
+
return `${arch === "x64" ? "x86_64" : "aarch64"}-apple-darwin`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (os === "win32") {
|
|
32
|
+
if (arch !== "x64") {
|
|
33
|
+
throw new Error(
|
|
34
|
+
"unsupported Windows architecture for kagi: arm64. Use x86_64 Windows or a GitHub Release asset for another supported platform."
|
|
35
|
+
);
|
|
36
|
+
}
|
|
33
37
|
|
|
34
|
-
|
|
35
|
-
throw new Error(`unsupported operating system for kagi: ${os}`);
|
|
38
|
+
return "x86_64-pc-windows-msvc";
|
|
36
39
|
}
|
|
37
40
|
|
|
38
|
-
|
|
41
|
+
throw new Error(`unsupported operating system for kagi: ${os}`);
|
|
39
42
|
}
|
|
40
43
|
|
|
41
44
|
function getBinaryPath() {
|