Skip to content

fix(shell): restore '--' arg-forwarding separator to shell scripts#2350

Merged
TalZaccai merged 1 commit into
mainfrom
talzacc/shell-scripts-restore-arg-forwarding
May 15, 2026
Merged

fix(shell): restore '--' arg-forwarding separator to shell scripts#2350
TalZaccai merged 1 commit into
mainfrom
talzacc/shell-scripts-restore-arg-forwarding

Conversation

@TalZaccai
Copy link
Copy Markdown
Contributor

PR #2342 (the YAML config loader migration) dropped the trailing -- --env ../../.env from the shell's start, dev, and start:nosandbox scripts. The --env flag itself is correctly gone, but the bare -- separator went with it — and that separator is what made pnpm run shell --connect (and similar pass-through invocations) work, by telling electron-vite's CAC parser to forward trailing args to the spawned electron process instead of consuming them itself.

Symptom

> pnpm run shell --connect
CACError: Unknown option `--connect`
    at Command.checkUnknownOptions (.../cac/dist/index.mjs:400:17)
    at CAC.runMatchedCommand (.../cac/dist/index.mjs:598:13)
    ...

Without the trailing --, pnpm run shell --connect expands to electron-vite preview --connect, which electron-vite tries (and fails) to parse.

Fix

Restore the trailing -- on start, dev, and start:nosandbox. start:connect already has it (since it has its own --connect arg to forward).

Validation

  • pnpm run shell --connect (from ts/) — succeeds, --connect reaches the electron process.
  • pnpm run shell (no extra args) — unchanged behavior.
  • pnpm -C packages/shell run start:connect — unchanged behavior.

Affects 3 lines.

…nosandbox

PR #2342 dropped the trailing '-- --env ../../.env' from these scripts when migrating off .env to the YAML config loader. The '--env' flag is gone (correct), but the bare '--' separator went with it — and that separator is what made 'pnpm run shell --connect' (and similar pass-through invocations) work, by telling electron-vite's CAC parser to forward the trailing args to the spawned electron process instead of trying to consume them itself.

Without the separator, 'pnpm run shell --connect' becomes 'electron-vite preview --connect', and electron-vite throws CACError: Unknown option \--connect\.

Restore the trailing '--' on 'start', 'dev', and 'start:nosandbox'. 'start:connect' already had it (because of its own '--connect' arg).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@TalZaccai TalZaccai changed the title fix(shell): restore '--' arg-forwarding separator on start/dev/start:nosandbox scripts fix(shell): restore '--' arg-forwarding separator to shell May 15, 2026
@TalZaccai TalZaccai changed the title fix(shell): restore '--' arg-forwarding separator to shell fix(shell): restore '--' arg-forwarding separator to shell scripts May 15, 2026
@TalZaccai TalZaccai added this pull request to the merge queue May 15, 2026
Merged via the queue into main with commit d07e845 May 15, 2026
19 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant