fix: preserve PATHEXT for Windows cached tasks#366
Merged
branchseer merged 2 commits intovoidzero-dev:mainfrom Apr 30, 2026
Merged
fix: preserve PATHEXT for Windows cached tasks#366branchseer merged 2 commits intovoidzero-dev:mainfrom
branchseer merged 2 commits intovoidzero-dev:mainfrom
Conversation
77b9c71 to
1e39e4b
Compare
1e39e4b to
98815c7
Compare
fengmk2
approved these changes
Apr 29, 2026
98815c7 to
dcf59c2
Compare
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4699ea1 to
c05666b
Compare
Member
|
Thanks! |
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 #365.
Preserves PATHEXT in the default Windows environment passthrough so PowerShell package shims can resolve node.exe during cached task execution.
Why PATHEXT is required
In the issue repro,
marker-cliis exposed through a pnpm-generatednode_modules/.bin/marker-cli.ps1shim. On Windows, that shim sets$exe = ".exe"and then falls back to invoking Node by name:So the actual command is
& "node.exe" ....When
PATHEXTis missing from the sanitized cached-task environment, PowerShell can still locatenode.exewithGet-Command node.exe, but native invocation by name does not run correctly:& "node.exe" --versionproduces no output,$LASTEXITCODEis unset, and the repro marker file is not created. RestoringPATHEXTwith.EXEmakes the same shim execute normally and create the marker.This is why preserving
PATHEXTfixes the cached PowerShell shim path without changing fspy or the shim rewrite itself.Verified with the issue repro on Windows,
cargo fmt --check,cargo build -p vite_task_bin, andcargo test -p vite_task_plan --test plan_snapshots -- windows_cmd_shim_rewrite.