Skip to content

fix(shared): avoid Node 24 DEP0190 when spawning Windows .cmd shims - #2

Closed
cestercian wants to merge 466 commits into
mainfrom
cursor/fix-windows-dep0190-spawn-9594
Closed

cestercian wants to merge 466 commits into
mainfrom
cursor/fix-windows-dep0190-spawn-9594

Conversation

@cestercian

@cestercian cestercian commented Sep 21, 2026 •

Copy link
Copy Markdown
Owner

What Changed

Windows .cmd / .bat shims (npm launchers like opencode.cmd) no longer go through spawn(file, args, { shell: true }).

resolveSpawnCommand still escapes the executable and arguments with the existing cmd.exe quoting, but it now returns that as a single command string with an empty args array. Node 24's documented migration is "do not pass an args array when shell is true"; Node still expands shell: true to %ComSpec% /d /s /c "…" with windowsVerbatimArguments, so npm shims keep launching.

.exe / .com paths stay shell: false.

Why

On Windows/Node 24, spawn(file, args, { shell: true }) concatenates args and emits a deprecation warning. Nightly hits this on every OpenCode / provider .cmd spawn (opencode.cmd serve, npm.cmd updates, etc.). Chats still work; the warning (and a stray cmd.exe console) repeats on every backend start.

Effect's child-process options do not currently thread windowsVerbatimArguments, so spawning ComSpec ourselves with /d /s /c would let libuv re-quote the /c payload and break paths with spaces. Folding the already-escaped line into command keeps the same cmd.exe expansion Node used before, without the deprecated argv path.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes
Open in Web Open in Cursor 

juliusmarminge and others added 30 commits September 15, 2026 08:06
…ingdotgg#11883)

Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
…dotgg#11906)

Co-authored-by: T3 Code Test <t3code-test@example.com>
…gg#11381)

Co-authored-by: yashranaway <yashranaway@users.noreply.github.com>
…ngdotgg#8309)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…tgg#11958)

Co-authored-by: Antony <tnybyn@gmail.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com>
…folders (pingdotgg#12008)

The health probe launched the PyInstaller ACP binary every minute and force killed it, leaving about 1 GB of _MEI files per run. The probe now resolves the install on disk without spawning. Each ACP process gets its own temp directory under the profile that is removed when the runtime closes, and the driver sweeps the profile temp root on create.

Continues pingdotgg#11657 by Vita Skacel. Owned temp directory approach from pingdotgg#9626 by ariszz.

Co-authored-by: Vita Skacel <skacel.vita@gmail.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…ingdotgg#12002)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
t3-code-bot Bot and others added 25 commits September 20, 2026 20:35
)

Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: Exotic <118054752+extoci@users.noreply.github.com>
…g#12808)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…off (pingdotgg#12807)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…s page (pingdotgg#12536)

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…2243)

Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
…2805)

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
pingdotgg#12833)

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…nch (pingdotgg#12623)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
On Windows, resolveSpawnCommand used spawn(file, args, { shell: true })
for npm .cmd/.bat launchers. Node 24 concatenates those args and emits
DEP0190. Fold the already-escaped command line into `command` with an
empty args array so Node still expands shell: true to ComSpec /d /s /c
without the deprecated argv path.
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL labels Sep 21, 2026
@cestercian

Copy link
Copy Markdown
Owner Author

closing — this is a mirror against a stale fork main (looks like 5800 files). Real PR is upstream: pingdotgg#12863

@cestercian cestercian closed this Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.