Repository navigation
fix(shared): avoid DEP0190 when spawning .cmd/.bat shims on Windows - #12863
cestercian wants to merge 3 commits into
Conversation
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.
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — The PR is a focused Windows compatibility fix that preserves existing .cmd/.bat execution while avoiding Node 24’s deprecated shell-spawn argument shape. Runtime, editor, maintenance, and escaping cases are covered by targeted test updates, with no product-default or deployment changes. Notes:
You can add or adjust custom eligibility rules. Learn more. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: pingdotgg/t3code/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe Windows ChangesWindows shell shim handling
Estimated code review effort: 2 (Simple) | ~15 minutes Suggested reviewers: Merge Risk: ⚪ Minimal · up to The Windows shim change can proceed through normal merge checks; no actionable regression or sensitive-data exposure was established. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Linked Issues checkExplanation The PR addresses the DEP0190 argument shape for issue Resolution For
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Align processRunner and externalLauncher tests with resolveSpawnCommand folding .cmd/.bat args into the shell command line with an empty argv.
Dismissing prior approval to re-evaluate 7a3cb01
Dismissing prior approval to re-evaluate 7a3cb01
Summary
On Windows with Node 24,
resolveSpawnCommandwas returning a.cmd/.batpath plus an args array withshell: true, which triggers DEP0190.Return a single
commandstring with an emptyargsarray for those shims so Node expandsshell: trueas%ComSpec% /d /s /c "…", while.exe/.comstayshell: false.Test plan
vp test run packages/shared/src/shell.test.ts apps/server/src/provider/providerMaintenanceRunner.test.ts(50 passed)Fixes #12797
Summary by CodeRabbit
.cmdand.battools, including editor launches and maintenance commands.