From da3fd178e041769bc4b6bce00c2ad9f5edec4f83 Mon Sep 17 00:00:00 2001 From: Duarte Martins Date: Mon, 26 Jan 2026 13:05:34 +0100 Subject: [PATCH 1/2] 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 --- src/commands/signal-install.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/commands/signal-install.ts b/src/commands/signal-install.ts index b77332574..257af9083 100644 --- a/src/commands/signal-install.ts +++ b/src/commands/signal-install.ts @@ -53,13 +53,25 @@ function pickAsset(assets: ReleaseAsset[], platform: NodeJS.Platform) { if (platform === "darwin") { return ( 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") { 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"), + ) ); } From 0001b68fadd4cfc83b9a5b69074500952ab04c61 Mon Sep 17 00:00:00 2001 From: Duarte Martins Date: Mon, 26 Jan 2026 13:11:17 +0100 Subject: [PATCH 2/2] Update src/commands/signal-install.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/commands/signal-install.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/commands/signal-install.ts b/src/commands/signal-install.ts index 257af9083..e2e4b37ef 100644 --- a/src/commands/signal-install.ts +++ b/src/commands/signal-install.ts @@ -54,12 +54,14 @@ function pickAsset(assets: ReleaseAsset[], platform: NodeJS.Platform) { return ( byName(/macos|osx|darwin/) || // 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"), - ) + withName.find((asset) => { + const name = asset.name.toLowerCase(); + return ( + looksLikeArchive(name) && + !name.includes("linux-native") && + !/windows|win/.test(name) + ); + }) ); }