Visitar URL original
fix: Avoid pnpm batch-shim shutdown hangs on Windows by sahyl · Pull Request #14819 · vercel/turborepo · GitHub
Skip to content

fix: Avoid pnpm batch-shim shutdown hangs on Windows - #14819

Merged
anthonyshew merged 2 commits into
vercel:mainfrom
sahyl:fix/14803-pnpm-cmd-shutdown
Oct 16, 2026
Merged

anthonyshew merged 2 commits into
vercel:mainfrom
sahyl:fix/14803-pnpm-cmd-shutdown

Conversation

@sahyl

@sahyl sahyl commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #14803.

Persistent tasks can hang after Ctrl+C when pnpm is installed through npm on Windows. The app exits, but pnpm.cmd stays alive waiting for batch-job confirmation.

Recognize npm’s native pnpm launcher and run its pnpm.exe directly. 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

  • 14 Windows unit tests passed. LF and CRLF coverage now runs through command selection.
  • Native Windows CLI checks confirmed shutdown, argument forwarding, and Corepack version selection.
  • Formatting, Clippy, and diff checks passed.

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 when is_file() was temporarily weakened to exists(). A default Node installer setup has not been tested.

@sahyl
sahyl requested review from a team and tknickman October 16, 2026 16:06
@vercel

vercel Bot commented Oct 16, 2026

Copy link
Copy Markdown
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 anthonyshew left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I did some simplifying and tested that it still works.

@anthonyshew
anthonyshew enabled auto-merge (squash) October 16, 2026 22:49
@anthonyshew
anthonyshew merged commit 9c9236e into vercel:main Oct 16, 2026
78 of 101 checks passed
@sahyl
sahyl deleted the fix/14803-pnpm-cmd-shutdown branch October 19, 2026 10:53
anthonyshew pushed a commit that referenced this pull request Oct 20, 2026
## Release v2.11.10

Versioned docs: https://v2-11-10.turborepo.dev

### Changes

- fix: Allow non-recursive Turbo commands in root tasks (#14814)
(`730a98a`)
- chore: Release Turborepo 2.11.9 (#14824) (`ee546c6`)
- chore(deps): Update dependency @vercel/geistdocs to v2 (#14417)
(`516f995`)
- chore: Update with-gatsby example (#14796) (`ef60d93`)
- fix: Avoid pnpm batch-shim shutdown hangs on Windows (#14819)
(`9c9236e`)
- chore(deps): Update dependency @vercel/geistdocs to v2.11.0 (#14832)
(`bdfbb21`)
- fix: Exclude tool-managed directories from local dependency inputs
(#14696) (`db2b83c`)
- fix: Match git's text=auto binary detection in file hashing (#14697)
(`d154e7e`)
- fix: Drop @react-router/dev from Remix match list (#14800) (`3962b47`)
- fix: Match package configuration files and directory inputs in
task-level affected detection (#14804) (`d926d6a`)
- fix: Parse pnpm 8 single-project lockfiles (#14806) (`57ecce3`)
- fix: Keep task env vars in the hash when globalEnv excludes inferred
vars (#14805) (`6048038`)
- docs: Generate the sitemap from Geistdocs sources (#14865) (`9330903`)
- fix: Restore cached symlinks when outputs are already on disk (#14807)
(`921155f`)
- chore: Remove CODEOWNERS file (#14810) (`b42cc68`)
- feat: Enable WebMCP for Turborepo docs (#14828) (`af866e5`)
- fix: Exit quietly when `turbo ls` output is piped to a closed reader
(#14868) (`9816503`)
- fix: Distrust compromised eMudhra intermediate certificates (#14876)
(`aaf5a3a`)

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
markharding pushed a commit to futo-org/Harbor that referenced this pull request Oct 27, 2026
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [turbo](https://turborepo.dev) ([source](https://github.com/vercel/turborepo)) | [`2.11.9` → `2.11.10`](https://renovatebot.com/diffs/npm/turbo/2.11.9/2.11.10) | ![age](https://developer.mend.io/api/mc/badges/age/npm/turbo/2.11.10?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/turbo/2.11.9/2.11.10?slim=true) |

---

> ⚠️ **Warning**
>
> Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/99) for more information.

---

### Release Notes

<details>
<summary>vercel/turborepo (turbo)</summary>

### [`v2.11.10`](https://github.com/vercel/turborepo/releases/tag/v2.11.10): Turborepo v2.11.10

[Compare Source](vercel/turborepo@v2.11.9...v2.11.10)

<!-- Release notes generated using configuration in .github/release.yml at v2.11.10 -->

#### What's Changed

##### Changelog

- fix: Allow non-recursive Turbo commands in root tasks by [@&#8203;sahyl](https://github.com/sahyl) in [#&#8203;14814](vercel/turborepo#14814)
- chore: Release Turborepo 2.11.9 by [@&#8203;github-actions](https://github.com/github-actions)\[bot] in [#&#8203;14824](vercel/turborepo#14824)
- chore(deps): Update dependency [@&#8203;vercel/geistdocs](https://github.com/vercel/geistdocs) to v2 by [@&#8203;vercel-gh-bot-4](https://github.com/vercel-gh-bot-4)\[bot] in [#&#8203;14417](vercel/turborepo#14417)
- chore: Update with-gatsby example by [@&#8203;vercel-gh-bot-3](https://github.com/vercel-gh-bot-3)\[bot] in [#&#8203;14796](vercel/turborepo#14796)
- fix: Avoid pnpm batch-shim shutdown hangs on Windows by [@&#8203;sahyl](https://github.com/sahyl) in [#&#8203;14819](vercel/turborepo#14819)
- chore(deps): Update dependency [@&#8203;vercel/geistdocs](https://github.com/vercel/geistdocs) to v2.11.0 by [@&#8203;vercel-gh-bot-3](https://github.com/vercel-gh-bot-3)\[bot] in [#&#8203;14832](vercel/turborepo#14832)
- fix: Exclude tool-managed directories from local dependency inputs by [@&#8203;PedroRosalba](https://github.com/PedroRosalba) in [#&#8203;14696](vercel/turborepo#14696)
- fix: Match git's text=auto binary detection in file hashing by [@&#8203;PedroRosalba](https://github.com/PedroRosalba) in [#&#8203;14697](vercel/turborepo#14697)
- fix: Drop [@&#8203;react-router/dev](https://github.com/react-router/dev) from Remix match list by [@&#8203;Pcmhacker-piro](https://github.com/Pcmhacker-piro) in [#&#8203;14800](vercel/turborepo#14800)
- fix: Match package configuration files and directory inputs in task-level affected detection by [@&#8203;PedroRosalba](https://github.com/PedroRosalba) in [#&#8203;14804](vercel/turborepo#14804)
- fix: Parse pnpm 8 single-project lockfiles by [@&#8203;PedroRosalba](https://github.com/PedroRosalba) in [#&#8203;14806](vercel/turborepo#14806)
- fix: Keep task env vars in the hash when globalEnv excludes inferred vars by [@&#8203;PedroRosalba](https://github.com/PedroRosalba) in [#&#8203;14805](vercel/turborepo#14805)
- docs: Generate the sitemap from Geistdocs sources by [@&#8203;molebox](https://github.com/molebox) in [#&#8203;14865](vercel/turborepo#14865)
- fix: Restore cached symlinks when outputs are already on disk by [@&#8203;PedroRosalba](https://github.com/PedroRosalba) in [#&#8203;14807](vercel/turborepo#14807)
- chore: Remove CODEOWNERS file by [@&#8203;anthonyshew](https://github.com/anthonyshew) with [@&#8203;Copilot](https://github.com/Copilot) in [#&#8203;14810](vercel/turborepo#14810)
- feat: Enable WebMCP for Turborepo docs by [@&#8203;anthonyshew](https://github.com/anthonyshew) in [#&#8203;14828](vercel/turborepo#14828)
- fix: Exit quietly when `turbo ls` output is piped to a closed reader by [@&#8203;drakeo338](https://github.com/drakeo338) in [#&#8203;14868](vercel/turborepo#14868)
- fix: Distrust compromised eMudhra intermediate certificates by [@&#8203;anthonyshew](https://github.com/anthonyshew) in [#&#8203;14876](vercel/turborepo#14876)

**Full Changelog**: <vercel/turborepo@v2.11.9...v2.11.10>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 9am on tuesday"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xNzUuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjE3NS4xIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZSJdfQ==-->

Reviewed-on: https://code.futo.org/harbor/harbor/pulls/2034
markharding pushed a commit to futo-org/Harbor that referenced this pull request Oct 29, 2026
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [turbo](https://turborepo.dev) ([source](https://github.com/vercel/turborepo)) | [`2.11.9` → `2.11.10`](https://renovatebot.com/diffs/npm/turbo/2.11.9/2.11.10) | ![age](https://developer.mend.io/api/mc/badges/age/npm/turbo/2.11.10?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/turbo/2.11.9/2.11.10?slim=true) |

---

> ⚠️ **Warning**
>
> Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/99) for more information.

---

### Release Notes

<details>
<summary>vercel/turborepo (turbo)</summary>

### [`v2.11.10`](https://github.com/vercel/turborepo/releases/tag/v2.11.10): Turborepo v2.11.10

[Compare Source](vercel/turborepo@v2.11.9...v2.11.10)

<!-- Release notes generated using configuration in .github/release.yml at v2.11.10 -->

#### What's Changed

##### Changelog

- fix: Allow non-recursive Turbo commands in root tasks by [@&#8203;sahyl](https://github.com/sahyl) in [#&#8203;14814](vercel/turborepo#14814)
- chore: Release Turborepo 2.11.9 by [@&#8203;github-actions](https://github.com/github-actions)\[bot] in [#&#8203;14824](vercel/turborepo#14824)
- chore(deps): Update dependency [@&#8203;vercel/geistdocs](https://github.com/vercel/geistdocs) to v2 by [@&#8203;vercel-gh-bot-4](https://github.com/vercel-gh-bot-4)\[bot] in [#&#8203;14417](vercel/turborepo#14417)
- chore: Update with-gatsby example by [@&#8203;vercel-gh-bot-3](https://github.com/vercel-gh-bot-3)\[bot] in [#&#8203;14796](vercel/turborepo#14796)
- fix: Avoid pnpm batch-shim shutdown hangs on Windows by [@&#8203;sahyl](https://github.com/sahyl) in [#&#8203;14819](vercel/turborepo#14819)
- chore(deps): Update dependency [@&#8203;vercel/geistdocs](https://github.com/vercel/geistdocs) to v2.11.0 by [@&#8203;vercel-gh-bot-3](https://github.com/vercel-gh-bot-3)\[bot] in [#&#8203;14832](vercel/turborepo#14832)
- fix: Exclude tool-managed directories from local dependency inputs by [@&#8203;PedroRosalba](https://github.com/PedroRosalba) in [#&#8203;14696](vercel/turborepo#14696)
- fix: Match git's text=auto binary detection in file hashing by [@&#8203;PedroRosalba](https://github.com/PedroRosalba) in [#&#8203;14697](vercel/turborepo#14697)
- fix: Drop [@&#8203;react-router/dev](https://github.com/react-router/dev) from Remix match list by [@&#8203;Pcmhacker-piro](https://github.com/Pcmhacker-piro) in [#&#8203;14800](vercel/turborepo#14800)
- fix: Match package configuration files and directory inputs in task-level affected detection by [@&#8203;PedroRosalba](https://github.com/PedroRosalba) in [#&#8203;14804](vercel/turborepo#14804)
- fix: Parse pnpm 8 single-project lockfiles by [@&#8203;PedroRosalba](https://github.com/PedroRosalba) in [#&#8203;14806](vercel/turborepo#14806)
- fix: Keep task env vars in the hash when globalEnv excludes inferred vars by [@&#8203;PedroRosalba](https://github.com/PedroRosalba) in [#&#8203;14805](vercel/turborepo#14805)
- docs: Generate the sitemap from Geistdocs sources by [@&#8203;molebox](https://github.com/molebox) in [#&#8203;14865](vercel/turborepo#14865)
- fix: Restore cached symlinks when outputs are already on disk by [@&#8203;PedroRosalba](https://github.com/PedroRosalba) in [#&#8203;14807](vercel/turborepo#14807)
- chore: Remove CODEOWNERS file by [@&#8203;anthonyshew](https://github.com/anthonyshew) with [@&#8203;Copilot](https://github.com/Copilot) in [#&#8203;14810](vercel/turborepo#14810)
- feat: Enable WebMCP for Turborepo docs by [@&#8203;anthonyshew](https://github.com/anthonyshew) in [#&#8203;14828](vercel/turborepo#14828)
- fix: Exit quietly when `turbo ls` output is piped to a closed reader by [@&#8203;drakeo338](https://github.com/drakeo338) in [#&#8203;14868](vercel/turborepo#14868)
- fix: Distrust compromised eMudhra intermediate certificates by [@&#8203;anthonyshew](https://github.com/anthonyshew) in [#&#8203;14876](vercel/turborepo#14876)

**Full Changelog**: <vercel/turborepo@v2.11.9...v2.11.10>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 9am on tuesday"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xNzUuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjE3NS4xIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZSJdfQ==-->

Reviewed-on: https://code.futo.org/harbor/harbor/pulls/2034
anthonyshew pushed a commit that referenced this pull request Oct 30, 2026
## Release v2.11.11-canary.1

Versioned docs: https://v2-11-11-canary-1.turborepo.dev

### Changes

- chore: Release Turborepo 2.11.9-canary.1 (#14817) (`a3bcc4a`)
- fix: Allow native package manager configuration during setup (#14816)
(`9c90852`)
- refactor: Remove setup lifecycle script controls (#14818) (`679efb8`)
- docs: Use .NET in the multi-language guide (#14793) (`6834819`)
- fix(cache): Parallelize dry-run HEAD fallback (#14801) (`78b039e`)
- fix: Allow non-recursive Turbo commands in root tasks (#14814)
(`730a98a`)
- chore: Release Turborepo 2.11.9 (#14824) (`ee546c6`)
- chore(deps): Update dependency @vercel/geistdocs to v2 (#14417)
(`516f995`)
- chore: Update with-gatsby example (#14796) (`ef60d93`)
- fix: Avoid pnpm batch-shim shutdown hangs on Windows (#14819)
(`9c9236e`)
- chore(deps): Update dependency @vercel/geistdocs to v2.11.0 (#14832)
(`bdfbb21`)
- fix: Exclude tool-managed directories from local dependency inputs
(#14696) (`db2b83c`)
- fix: Match git's text=auto binary detection in file hashing (#14697)
(`d154e7e`)
- fix: Drop @react-router/dev from Remix match list (#14800) (`3962b47`)
- fix: Match package configuration files and directory inputs in
task-level affected detection (#14804) (`d926d6a`)
- fix: Parse pnpm 8 single-project lockfiles (#14806) (`57ecce3`)
- fix: Keep task env vars in the hash when globalEnv excludes inferred
vars (#14805) (`6048038`)
- docs: Generate the sitemap from Geistdocs sources (#14865) (`9330903`)
- fix: Restore cached symlinks when outputs are already on disk (#14807)
(`921155f`)
- chore: Remove CODEOWNERS file (#14810) (`b42cc68`)
- feat: Enable WebMCP for Turborepo docs (#14828) (`af866e5`)
- fix: Exit quietly when `turbo ls` output is piped to a closed reader
(#14868) (`9816503`)
- fix: Distrust compromised eMudhra intermediate certificates (#14876)
(`aaf5a3a`)
- chore: Release Turborepo 2.11.10 (#14877) (`42e0007`)
- fix: Remove redundant task disclaimers from setup output (#14870)
(`b13d946`)
- fix: Report declared package manager versions in turbo info (#14830)
(`4504b41`)
- feat: Stop requiring `.turbo/` to be Git-ignored in turbo setup
(#14822) (`50e89d6`)
- fix: Isolate JS test fixture cleanup between suites (#14864)
(`1478ff0`)
- fix: Remove Linux host version fingerprints from Python caching
(#14861) (`4cb05b1`)
- fix: Write the restore manifest before a local cache restore returns
(#14872) (`ee50b48`)
- fix: Handle SIGHUP in the npm wrapper (#14856) (`963cce3`)
- fix: Keep remote cache reads when uploads are forbidden or the token
is read-only (#14797) (`2d49b98`)
- fix: Discover new workspace packages in watch mode (#14858)
(`25e2678`)
- refactor: Remove verify-system from `turbo setup` (#14821) (`5cbcc16`)
- fix: Hash executable permissions behind a future flag (#14859)
(`44e2654`)
- fix: Hash tracked outputs as task inputs (#14831) (`9557106`)
- fix: Hash Bun patch contents for cache invalidation (#14853)
(`4529fb5`)
- fix: Debounce watch rebuilds for bursts of edits (#14857) (`35f16c8`)
- fix: Hash symlink input contents within repository boundaries (#14825)
(`5f748d4`)
- fix: Include both paths of staged renames in affected runs (#14855)
(`8237e03`)
- fix: Restrict saved Vercel credentials to Vercel endpoints (#14878)
(`f066fd0`)
- chore(deps): Update dependency @vercel/geistdocs to v2.12.3 (#14869)
(`3f3bcad`)
- chore: Update with-prisma example (#14879) (`b90e6ea`)
- examples: Update Node.js version in Dockerfile to v24.22.1 (#14881)
(`8003ff0`)
- ci: Update setup-uv to v10.3.2 and uv to 0.13.5 (#14882) (`ec028ea`)
- chore(deps): Update dependency @vercel/geistdocs to v2.13.1 (#14883)
(`70cc3d1`)
- chore(deps): Update dependency @vercel/geistdocs to v2.13.2 (#14892)
(`b2a98bd`)
- chore: Update with-rsbuild-module-federation example (#14889)
(`6244633`)
- ci: Move macOS release builds off retiring macos-14 runners (#14886)
(`fffe3c0`)
- chore: Update with-nestjs example (#14834) (`f4b1324`)
- chore: Update with-npm example (#14863) (`fe7da01`)
- examples: Upgrade with-react-native-web to Expo SDK 58 (#14884)
(`453a616`)
- fix: Keep uv members nested under excluded directories (#14894)
(`20a88e6`)
- chore: Update with-solid example (#14895) (`fa5aba9`)
- fix: Remove setup storage summaries (#14893) (`1e3d284`)
- fix: Harmonize homepage metric letter spacing (#14897) (`38b4fd8`)
- fix: Scope pnpm lockfile v9 patchedDependencies changes to consuming
packages (#14899) (`8757ae9`)
- chore(deps): Update dependency @vercel/geistdocs to v2.14.0 (#14900)
(`edace46`)
- fix: remove unncessary version key from docker compose yaml file
(#14862) (`e158e85`)
- chore(deps): Update dependency @vercel/geistdocs to v2.14.1 (#14905)
(`2bb439d`)
- fix: Restore cache files without temporary names (#14898) (`cab0e8e`)
- feat: Redesign turbo setup terminal output (#14906) (`47ddd00`)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows: persistent task hangs after Ctrl+C when pnpm is installed with npm (pnpm.cmd shim)

2 participants