fix: gate cmd switch escaping to MSYS#58
Conversation
|
Warning Review limit reached
More reviews will be available in 54 minutes and 38 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughRefactors ChangesMSYS-aware sh shim generation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
PR Summary by QodoGate cmd /C switch escaping to MSYS shells in sh shims WalkthroughsDescription• Preserve POSIX basedir while maintaining a Windows basedir for native executables. • Only apply MSYS //C escaping for cmd shims under MSYS/Cygwin/Mingw shells. • Update shim snapshot expectations for the new MSYS-gated execution logic. Diagramgraph TD
A["generateShShim()"] --> B{"uname indicates MSYS?"}
B -->|"yes"| C["set basedir_win via cygpath + msys=true"] --> D{"cmd runtime?"}
B -->|"no"| E["keep basedir (POSIX) + basedir_win"] --> D
D -->|"yes"| F["exec with escaped switches (//C)"]
D -->|"no"| G["exec with original args (/C etc.)"]
High-Level AssessmentThe following are alternative approaches to this PR: 1. Detect MSYS via environment variables (e.g., MSYSTEM) instead of uname
2. Always use //C for cmd shims on any non-Windows sh shell
Recommendation: Keep the PR’s runtime MSYS gating approach: it addresses the MSYS argument translation bug while preserving expected behavior on WSL and other shells. uname-based detection is consistent with existing shim platform branching and avoids relying on environment-variable conventions. File ChangesBug fix (1)
Tests (1)
|
001f86b to
4a16c7c
Compare
Summary:
Tests:
Written by an agent (Codex, GPT-5).
Summary by CodeRabbit
Bug Fixes
Refactor