ci(turbo): pass PATHEXT and ComSpec through on Windows so the pnpm shim finds pnpm.exe - #244
Open
BSalaeddin wants to merge 1 commit into
Open
BSalaeddin wants to merge 1 commit into
BSalaeddin wants to merge 1 commit into
Conversation
…im finds pnpm.exe Turbo's default strict env mode strips PATHEXT and ComSpec from task environments. On Windows that breaks every task turbo runs: the `pnpm` on PATH is a shim that re-executes the engine pinned by `packageManager`, and with no PATHEXT it looks for an extensionless `pnpm`, never considers `pnpm.exe`, and dies with ERR_PNPM_ENGINE_BIN_MISSING. Upstream fixed this in vercel/turborepo#13114 by adding both variables to turbo's default passthrough list, released in turbo v2.10.0; this repo is on turbo 2.5.4, so the passthrough is declared here instead. Proven on the affected machine: `turbo run lint --force` without --env-mode=loose goes from 0 of 2 tasks succeeding to 2 of 2. This is globalPassThroughEnv only — it declares no build-time variables, so the Dockerfile rule stands unchanged: the image build stays `pnpm --filter caramel-app run build`, never `turbo run build`. No-op on Linux CI: neither variable exists there, and passing through an unset variable changes nothing.
BSalaeddin
force-pushed
the
ci/turbo-windows-env-passthrough
branch
from
September 15, 2026 15:49
fbd5d9a to
4ef0cdb
Compare
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.
Turbo runs tasks under strict env mode by default, which strips every variable a task does not declare. On Windows that includes
PATHEXTandComSpec, and strippingPATHEXTbreaks every task turbo runs here: thepnpmon PATH is a shim that re-executes the engine pinned bypackageManager, and withoutPATHEXTit looks for an extensionlesspnpm, never considerspnpm.exe, and exits withERR_PNPM_ENGINE_BIN_MISSING. Upstream fixed this in vercel/turborepo#13114 by adding both variables to turbo's default passthrough list, shipped in turbo v2.10.0. This repo is on turbo 2.5.4, so the passthrough is declared inturbo.jsoninstead.Proof on the affected machine, in a clean worktree of this branch, with no
--env-mode=loose:This adds
globalPassThroughEnvonly and declares no build-time variables, so the Dockerfile rule documented in CLAUDE.md is untouched: the image build stayspnpm --filter caramel-app run build, neverturbo run build.No-op on Linux CI: neither variable exists on the runners, and passing through an unset variable changes nothing.
🤖 Generated with Claude Code