mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-04-28 05:33:10 +08:00
On Windows, npx, npm, yarn, pnpm, node, bun, and deno are actually
.cmd batch files that require cmd /c wrapper to execute properly.
This fixes the Claude Code /doctor warning:
"Windows requires 'cmd /c' wrapper to execute npx"
The transformation is applied when exporting MCP config to ~/.claude.json:
- Before: {"command": "npx", "args": ["-y", "foo"]}
- After: {"command": "cmd", "args": ["/c", "npx", "-y", "foo"]}
Uses conditional compilation (#[cfg(windows)]) for zero overhead on
other platforms.
Closes #453