Repository navigation
fix: Avoid pnpm batch-shim shutdown hangs on Windows - #14819
Merged
Merged
Conversation
Contributor
|
@sahyl is attempting to deploy a commit to the Internal Apps Team on Vercel. A member of the Team first needs to authorize it. |
anthonyshew
approved these changes
Oct 16, 2026
anthonyshew
left a comment
Contributor
There was a problem hiding this comment.
Thanks. I did some simplifying and tested that it still works.
anthonyshew
enabled auto-merge (squash)
October 16, 2026 22:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #14803.
Persistent tasks can hang after Ctrl+C when pnpm is installed through npm on Windows. The app exits, but
pnpm.cmdstays alive waiting for batch-job confirmation.Recognize npm’s native pnpm launcher and run its
pnpm.exedirectly. Compare the complete shim against the embedded npm-generated fixture before bypassing it so Corepack keeps control of version selection. Existing global-store support remains unchanged.Add Windows regression tests for npm and Corepack shims, unreadable or modified scripts, paths with spaces, and shim-name casing.
Validation
Unrecognized shim templates keep their existing behavior and may still need a second Ctrl+C. Corepack 0.31.0’s wrapper requires a second Ctrl+C on both main and this branch.
The original checks used Windows GNU builds and generated layout fixtures. Additional verification used Windows 11 ARM64 MSVC on a clean NTFS checkout. It used an actual npm-generated pnpm 12.6.0 shim in a prefix containing spaces, without an adjacent
node.exe. One Ctrl+C exited with code 0 and preserved quoted arguments. The directory-fallback test failed as expected whenis_file()was temporarily weakened toexists(). A default Node installer setup has not been tested.