From 9add0a4d61f0de80acadd9ce4fa5fdda37eb3f0d Mon Sep 17 00:00:00 2001 From: byGalax Date: Wed, 22 Apr 2026 19:19:42 +0200 Subject: [PATCH] fix(release): call tauri binary directly, not via desktop build script Node execSync runs via cmd.exe on Windows, which preserves the `--` separator pnpm injects between the script name and forwarded args. Tauri CLI then forwards that `--` to cargo, which rejects `--bundles` with "unexpected argument". Invoking `pnpm exec tauri build --bundles nsis` skips the script indirection so no `--` is emitted. Co-Authored-By: Claude Opus 4.7 (1M context) --- scripts/release.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/release.mjs b/scripts/release.mjs index 19d356f..92504c3 100644 --- a/scripts/release.mjs +++ b/scripts/release.mjs @@ -88,7 +88,11 @@ const buildEnv = { TAURI_SIGNING_PRIVATE_KEY: signingKey, TAURI_SIGNING_PRIVATE_KEY_PASSWORD: env.TAURI_SIGNING_PRIVATE_KEY_PASSWORD ?? '', }; -execSync('pnpm --filter @chat-app/desktop build -- --bundles nsis', { +// Call the tauri binary directly (not via the desktop `build` script) so the +// `--` separator pnpm normally injects doesn't get forwarded to cargo. When +// run from cmd.exe (Node's default execSync shell on Windows) pnpm preserves +// the `--`, which cargo then rejects with "unexpected argument '--bundles'". +execSync('pnpm --filter @chat-app/desktop exec tauri build --bundles nsis', { cwd: ROOT, env: buildEnv, stdio: 'inherit',