Skip to content

Commit b3aa628

Browse files
committed
fix(desktop): let CLI flag drive mac DMG arch
The publish-desktop matrix passes `--arm64`/`--x64` per leg, but the config-level `arch: ["arm64", "x64"]` on each mac.target object overrode those flags. Every matrix leg built both archs from its own single-arch sidecar binary; combined with `--clobber` uploads, both shipped DMGs ended up carrying the x86_64 sidecar (errno -86 EBADARCH on Apple Silicon). Drop the in-config arch list and let the CLI flag restrict, matching the pattern opencode/t3code use.
1 parent ef35f44 commit b3aa628

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
"@executor-js/desktop": patch
3+
"executor": patch
4+
---
5+
6+
Fix: macOS DMGs no longer ship a mismatched-architecture sidecar binary.
7+
electron-builder's `--arm64` / `--x64` CLI flags are overridden when the
8+
config-level target objects pin `arch: ["arm64", "x64"]`, so every matrix
9+
leg was building both archs from the same single-arch sidecar. Combined
10+
with `--clobber` release uploads, the final DMGs carried the x86_64
11+
sidecar everywhere, breaking spawn on Apple Silicon (errno -86 EBADARCH).
12+
Drop the in-config arch list and let the per-leg CLI flag restrict.

apps/desktop/electron-builder.config.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@ const config: Configuration = {
2626
],
2727
mac: {
2828
category: "public.app-category.developer-tools",
29-
target: [
30-
{ target: "dmg", arch: ["arm64", "x64"] },
31-
{ target: "zip", arch: ["arm64", "x64"] },
32-
],
29+
// Do NOT pin `arch:` inside the target objects. The publish workflow's
30+
// matrix passes `--arm64` / `--x64` per leg; a config-level arch list
31+
// would override that flag and force every leg to build both archs from
32+
// a single per-leg sidecar binary, shipping mismatched-arch DMGs (errno
33+
// -86 / EBADARCH on Apple Silicon). The CLI flag is the source of truth.
34+
target: ["dmg", "zip"],
3335
hardenedRuntime: true,
3436
gatekeeperAssess: false,
3537
// electron-builder reads CSC_LINK / CSC_KEY_PASSWORD for the signing

0 commit comments

Comments
 (0)