opencode: quote Windows spawn arguments - #71
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughWindows process spawning now quotes the executable and arguments according to MSVCRT rules. The POSIX spawning path remains unchanged. ChangesWindows spawn argument handling
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~15–30 minutes Merge Risk: ⚪ Minimal · up to Windows passthrough arguments with spaces, quotes, trailing backslashes, or empty values are preserved when launching OpenCode, without changing POSIX behavior. No current merge-blocking risk remains. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 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 |
wally opencode'sSpawnhas the same Windows bug the codex review (#70) found:the
_spawn*family joins argv into a command line without quoting, so apassthrough argument containing a space arrives at opencode split in two. On
POSIX
execvppasses argv verbatim, so only the Windows branch is affected.Adds the same MSVCRT-rule quoting used in the codex fix (double the backslash
run before a quote or the closing quote; backslash-escape embedded quotes),
applied to each argument on the Windows path only. Algorithm verified against
spaces, embedded quotes, trailing backslashes, and empty; POSIX path unchanged.
Summary by CodeRabbit