fix(cli): launch Windows package-manager shims through the spawn adapter - #250
Draft
AmanVarshney01 wants to merge 2 commits into
Draft
fix(cli): launch Windows package-manager shims through the spawn adapter#250AmanVarshney01 wants to merge 2 commits into
AmanVarshney01 wants to merge 2 commits into
Conversation
Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
commit: |
Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
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.
Problem
The consolidated CLI delegates Composer and other commands through its own spawn adapter. That adapter used native node:child_process.spawn, which cannot execute Windows .cmd shims directly.
Reproduced
The first commit runs the real installed npm.cmd through the shipped adapter. Existing Windows CI failed with spawn EINVAL (-4071), while 951 other tests passed: https://github.com/prisma/prisma-cli/actions/runs/34236425789/job/102095202659.
Fix
Use cross-spawn at the owning adapter. Preserve argv arrays, inherited human stdio, structured diagnostic forwarding/backpressure, bounded drain, exit status, and signal forwarding. No blanket shell:true and no create-prisma workaround. Declare the runtime dependency in both published package manifests. Document the execution contract.
Verification
Scope
Fixes Windows delegated shim launch failures, not every CLI.SPAWN_FAILED, auth error, build failure, or install failure. Composer executable discovery is separate: prisma/composer#280.
Kept as draft as requested.