Skip to content

fix(cli): launch Windows package-manager shims through the spawn adapter - #250

Draft
AmanVarshney01 wants to merge 2 commits into
mainfrom
codex/verify-windows-cli
Draft

fix(cli): launch Windows package-manager shims through the spawn adapter#250
AmanVarshney01 wants to merge 2 commits into
mainfrom
codex/verify-windows-cli

Conversation

@AmanVarshney01

@AmanVarshney01 AmanVarshney01 commented Sep 8, 2026

Copy link
Copy Markdown
Member

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.

Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Sep 8, 2026

Copy link
Copy Markdown

Open in StackBlitz

npx https://pkg.pr.new/@prisma/cli@250
npx https://pkg.pr.new/@prisma/cli-engine@250

commit: 4d84212

Signed-off-by: Aman Varshney <amanvarshney.work@gmail.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.

1 participant