fix: update @zkochan/cmd-shim to 9.0.3#11595
Conversation
Picks up the MSYS path-translation fix from pnpm/cmd-shim#55: the sh shim written for `.cmd` / `.bat` targets now escapes the `/C` switch as `//C` so Git Bash passes it through to cmd.exe unchanged. Without this, a bare `/C` was rewritten to `C:\` before reaching cmd.exe — cmd started interactively and the calling script saw cmd's banner instead of the wrapped command's output. Affects any cmd-shim-wrapped batch script invoked from Git Bash / MSYS / Cygwin on Windows.
📝 WalkthroughWalkthroughThis PR bumps Changescmd-shim Dependency Update
Possibly related PRs
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
Updates the workspace catalog to pick up @zkochan/cmd-shim@9.0.3, which includes an MSYS/Git Bash fix for invoking .cmd/.bat targets (escaping /C as //C so cmd.exe receives the intended flag on Windows MSYS environments).
Changes:
- Bump
@zkochan/cmd-shimfrom^9.0.2to^9.0.3in the workspace catalog and exclusion list. - Refresh
pnpm-lock.yamlto reflect the new resolved version and integrity for@zkochan/cmd-shim@9.0.3. - Add a changeset to release patch versions of
@pnpm/bins.linkerandpnpmdocumenting the fix.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pnpm-workspace.yaml | Updates the catalog and minimum release age exclude entry to @zkochan/cmd-shim@9.0.3. |
| pnpm-lock.yaml | Updates the lockfile resolution/snapshots to @zkochan/cmd-shim@9.0.3. |
| .changeset/update-cmd-shim-9-0-3.md | Adds release notes and triggers patch releases for the affected packages. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pnpm-workspace.yaml (1)
347-347: 💤 Low valueSpecific version exclusion may be redundant.
Line 346 already excludes all
@zkochan/*packages from the minimum release age requirement, which would include@zkochan/cmd-shim@9.0.3. The specific version entry on line 347 appears redundant.However, if this is intentional for documentation purposes or to explicitly track newly released versions, this is acceptable.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pnpm-workspace.yaml` at line 347, The explicit exclusion entry '@zkochan/cmd-shim@9.0.3' is redundant because the wildcard exclusion '@zkochan/*' already covers it; remove the specific line to avoid duplication, or if you intend to keep it for documentation/audit reasons add a comment explaining why it's listed separately; search for the entries '@zkochan/*' and '@zkochan/cmd-shim@9.0.3' to locate and update the configuration accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@pnpm-workspace.yaml`:
- Line 347: The explicit exclusion entry '@zkochan/cmd-shim@9.0.3' is redundant
because the wildcard exclusion '@zkochan/*' already covers it; remove the
specific line to avoid duplication, or if you intend to keep it for
documentation/audit reasons add a comment explaining why it's listed separately;
search for the entries '@zkochan/*' and '@zkochan/cmd-shim@9.0.3' to locate and
update the configuration accordingly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 90206528-02c1-4deb-8f4b-096a7d1fb2b8
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
.changeset/update-cmd-shim-9-0-3.mdpnpm-workspace.yaml
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Agent
- GitHub Check: Analyze (javascript)
- GitHub Check: Compile & Lint
🔇 Additional comments (4)
.changeset/update-cmd-shim-9-0-3.md (2)
1-4: LGTM! Changeset format is correct.The changeset correctly declares patch releases for
@pnpm/bins.linkerandpnpm, which is appropriate for a dependency update that includes a bug fix.
6-6: Excellent documentation of the fix.The changeset provides a clear, detailed explanation of:
- The root cause (MSYS path translation rewriting
/CtoC:\)- The solution (escaping as
//C)- The impact (affects cmd-shim-wrapped batch scripts in Git Bash/MSYS/Cygwin)
- Reference to the upstream fix
This level of detail will be valuable for users understanding what changed and why.
pnpm-workspace.yaml (2)
149-149: Dependency update is valid. The package@zkochan/cmd-shim@9.0.3is published to npm with no known security vulnerabilities.
149-149: No action needed—version references are consistent.All references to
@zkochan/cmd-shiminpnpm-workspace.yamlare consistent at version 9.0.3 (line 149 and line 347).
Summary
Picks up the MSYS path-translation fix from pnpm/cmd-shim#55.
The sh shim that cmd-shim writes for
.cmd/.battargets ran the script via:When invoked from Git Bash / MSYS / Cygwin on Windows, the path-conversion layer that runs as bash launches a native Win32 process rewrites arguments matching POSIX-path heuristics — a bare
/Cis treated as a path and rewritten toC:\. cmd.exe then never sees the/Cflag, starts interactively, and reads the remainder of the calling script as input until EOF. The fix escapes it as//C(the MSYS escape that passes through to cmd.exe as/C).Surfaced as the
pnpm nodefailure on PR #11553's Windows CI (example).Test plan
pnpm installupdates lockfile cleanlypn run lint:metapasses@pnpm/bins.linker(the only consumer of@zkochan/cmd-shim) compiles and tests passWritten by an agent (Claude Code, claude-opus-4-7).
Summary by CodeRabbit
Bug Fixes
Chores