fix: archon setup --spawn fails on Windows with spaces in repo path#1063
fix: archon setup --spawn fails on Windows with spaces in repo path#1063
Conversation
…aces (#1035) The cmd.exe fallback in spawnWindowsTerminal() used shell: true, which caused Bun/Node to flatten args into a single string without proper quoting. Paths with spaces were split at whitespace, breaking the /D argument to start. Changes: - Remove shell: true from cmd.exe fallback spawn options - Remove shell?: boolean from trySpawn options type (no callers need it) Fixes #1035 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughOptimized concurrent file fetching in the web distribution download process, fixed Windows process spawning for paths with spaces by removing the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔍 Comprehensive PR ReviewPR: #1063 — fix: archon setup --spawn fails on Windows with spaces in repo path SummaryThis is a 3-line, highly focused fix that removes Verdict: ✅
Why the Fix WorksWhen The double 🟡 Medium Advisory (No Action Required)No regression test locking the "no
|
| Title | Priority |
|---|---|
Narrow trySpawn catch to ENOENT, log unexpected errors at debug level |
P3 |
Add Windows spawn regression test for cmd.exe /D arg passthrough |
P3 |
Next Steps
- No auto-fix needed — zero CRITICAL or HIGH findings
- Consider creating follow-up issues for the two LOW/MEDIUM advisories
- Mark PR as ready (remove draft) and merge when CI passes
Reviewed by Archon comprehensive-pr-review workflow
Artifacts: ~/.archon/workspaces/coleam00/Archon/artifacts/runs/fcda97c174056e5e23dbda7334198509/review/
Fix Report: PR #1063Verdict: APPROVE — No fixes required All three review agents (code-review, error-handling, test-coverage) returned APPROVE with no CRITICAL or HIGH findings. The two findings surfaced were: MEDIUM: No regression test for "no shell: true" contract in
|
| Check | Status |
|---|---|
bun run type-check |
PASS (all 9 packages) |
bun run lint |
PASS (0 warnings) |
bun run test |
PASS (all test suites) |
Suggested Follow-ups (P3)
- Narrow
trySpawncatch toENOENT, log unexpected errors at debug level - Add Windows spawn regression test for cmd.exe
/Darg passthrough
The PR is ready to merge — remove draft status and merge when CI passes.
- Parallelize checksums + tarball fetch in serve.ts (removes waterfall latency) - Remove redundant existsSync before readFileSync in update-check.ts (catch already handles ENOENT) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Archon PR Validation ReportVerdict: ✅ APPROVE SummaryThe core fix is correct and minimal — removing Bug Confirmation
IssuesNo blocking issues found. Non-blocking feedback: The simplify commit ( Validated by archon-validate-pr workflow |
…1035 fix: archon setup --spawn fails on Windows with spaces in repo path
Summary
shell: truefrom thecmd.exefallback inspawnWindowsTerminal()inpackages/cli/src/commands/setup.tsshell?: booleanoptional field from thetrySpawnoptions typeshell: true, Bun usesCreateProcessdirectly and passes each argv entry correctly, so repo paths containing spaces are no longer split at the first spaceRoot Cause
Two issues compounded each other:
cmd.exefallback usedshell: true— Bun/Node joins the args array into a flat command string before handing it to the shell.repoPathwas not quoted, socmd.exe /c start "" /D C:\path with spaces\Archonsplit at the first space, causing the OS to fail finding the program.trySpawndeclared success viachild.pidonly —wt.exewas spawned (gaining a PID) but then died internally parsing its args. Since success was declared at PID-assignment time, thecmd.exefallback was never tried, and the user saw a false-positive "Setup wizard opened." message.This fix addresses issue #1 (the
cmd.exepath now works correctly). Issue #2 (false-positive success detection) is a separate UX improvement out of scope for this fix.Changes
packages/cli/src/commands/setup.tsshell: truefromcmd.exefallback spawn options (+1/-2 lines)Validation
All checks pass:
Manual validation: On Windows with a path containing spaces (e.g.,
C:\Users\user\GitHub Libraries\Archon),archon setup --spawnnow opens the setup wizard in a new terminal window correctly.Fixes #1035
Summary by CodeRabbit