fix: exclude Linux native builds when downloading signal-cli on macOS/Windows
On macOS and Windows, the fallback logic in pickAsset() would select the first archive it found, which could be the Linux native build. This caused "spawn Unknown system error -8" (ENOEXEC) on macOS ARM since the Linux ELF binary cannot execute there. Now the fallback explicitly excludes platform-specific native builds, ensuring the JVM version is selected on platforms without native builds. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
6859e1e6a6
commit
da3fd178e0
@ -53,13 +53,25 @@ function pickAsset(assets: ReleaseAsset[], platform: NodeJS.Platform) {
|
|||||||
if (platform === "darwin") {
|
if (platform === "darwin") {
|
||||||
return (
|
return (
|
||||||
byName(/macos|osx|darwin/) ||
|
byName(/macos|osx|darwin/) ||
|
||||||
withName.find((asset) => looksLikeArchive(asset.name.toLowerCase()))
|
// Fall back to JVM version, excluding platform-specific native builds
|
||||||
|
withName.find(
|
||||||
|
(asset) =>
|
||||||
|
looksLikeArchive(asset.name.toLowerCase()) &&
|
||||||
|
!asset.name.toLowerCase().includes("linux-native") &&
|
||||||
|
!asset.name.toLowerCase().includes("windows"),
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (platform === "win32") {
|
if (platform === "win32") {
|
||||||
return (
|
return (
|
||||||
byName(/windows|win/) || withName.find((asset) => looksLikeArchive(asset.name.toLowerCase()))
|
byName(/windows|win/) ||
|
||||||
|
// Fall back to JVM version, excluding platform-specific native builds
|
||||||
|
withName.find(
|
||||||
|
(asset) =>
|
||||||
|
looksLikeArchive(asset.name.toLowerCase()) &&
|
||||||
|
!asset.name.toLowerCase().includes("linux-native"),
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user