fix: route Windows .cmd shims through PowerShell to fix Ctrl+C terminal corruption#1414
Merged
fix: route Windows .cmd shims through PowerShell to fix Ctrl+C terminal corruption#1414
.cmd shims through PowerShell to fix Ctrl+C terminal corruption#1414Conversation
✅ Deploy Preview for viteplus-preview canceled.
|
Member
Author
How to use the Graphite Merge QueueAdd the label auto-merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
754ad9f to
ad0a26f
Compare
4ac205f to
f84a026
Compare
.cmd shims through PowerShell to fix Ctrl+C terminal corruption
232e34b to
fb9e642
Compare
branchseer
approved these changes
Apr 21, 2026
fb9e642 to
86ee43c
Compare
Pulls in voidzero-dev/vite-task#345 which prefers .ps1 shims over .cmd on Windows to avoid the "Terminate batch job (Y/N)?" prompt and terminal corruption on Ctrl+C during `vp run dev`. Closes #1176
Picks up the cache-portability fix for voidzero-dev/vite-task#345 (PowerShell rewrite moved from plan layer to spawn layer).
Picks up voidzero-dev/vite-task#345 fix for missing `which` dep on Windows after the module move.
vite-task PR voidzero-dev/vite-task#344 made `fspy_preload_unix` (a cdylib) an unconditional build-dep so cargo's artifact resolver doesn't panic during cross-compile. On musl, building a cdylib requires dynamically-linked libc; the default is static, so the build fails with: error: cannot produce cdylib for `fspy_preload_unix` as the target `x86_64-unknown-linux-musl` does not support these crate types Mirror vite-task's own musl CI: set `-C target-feature=-crt-static` in `RUSTFLAGS`. vite+ ships as a NAPI module that links musl libc dynamically, so this matches production.
86ee43c to
da5f147
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.

Summary
Running a
node_modules/.bin/*.cmdshim on Windows — whatvp run <script>does when resolvingvite,tsc, etc. — triggerscmd.exe's "Terminate batch job (Y/N)?" prompt on Ctrl+C. That prompt leaves the terminal in a corrupt state: backspace prints^H, Ctrl+C prints^C, input becomes sluggish.Pulls in voidzero-dev/vite-task#345 (merged as
c45e5e72), which teaches the plan layer to rewrite the invocation at plan time:PowerShell resolves
-File <relative>against its own working directory (= the task's cwd) and lands on the correct.ps1, so Ctrl+C propagates cleanly without thecmd.exehop. The.ps1path is cwd-relative soSpawnFingerprint.argsstays portable — no absolute paths leak into cache keys.The rewrite only fires when all of these hold: extension is
.cmd, path lives inside the workspace root, the two last path components are.bin/node_modules(case-insensitive), a sibling.ps1exists, andpwsh.exe/powershell.exeis on PATH. Any miss keeps the original.cmdpath — behavior matches pre-merge.Also includes a previously-pushed CI fix: the musl test job disables
crt-staticsofspy_preload_unix's cdylib build doesn't fail after voidzero-dev/vite-task#344 made that crate an unconditional build-dep.Closes #1176
Test plan
cargo check --workspaceclean on macOScwdand--filterinvocations)vp run devshould leave the terminal clean.cmdfallback on a Windows box with PATH stripped of PowerShell.cmdoutside the workspace is not rewritten