fix(shell): restore '--' arg-forwarding separator to shell scripts#2350
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #2342 (the YAML config loader migration) dropped the trailing
-- --env ../../.envfrom the shell'sstart,dev, andstart:nosandboxscripts. The--envflag 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
Without the trailing
--,pnpm run shell --connectexpands toelectron-vite preview --connect, which electron-vite tries (and fails) to parse.Fix
Restore the trailing
--onstart,dev, andstart:nosandbox.start:connectalready has it (since it has its own--connectarg to forward).Validation
pnpm run shell --connect(fromts/) — succeeds,--connectreaches the electron process.pnpm run shell(no extra args) — unchanged behavior.pnpm -C packages/shell run start:connect— unchanged behavior.Affects 3 lines.