Skip to content

doc: remove spawn with shell example from bat/cmd section#62243

Open
kovan wants to merge 1 commit intonodejs:mainfrom
kovan:doc/bat-cmd-spawn-deprecation
Open

doc: remove spawn with shell example from bat/cmd section#62243
kovan wants to merge 1 commit intonodejs:mainfrom
kovan:doc/bat-cmd-spawn-deprecation

Conversation

@kovan
Copy link
Contributor

@kovan kovan commented Mar 13, 2026

Remove the suggestion to use child_process.spawn() with the shell
option for running .bat and .cmd files on Windows. Passing arguments
through spawn with shell: true is deprecated (DEP0190) due to
shell injection risks. The exec() and direct cmd.exe spawn
alternatives remain documented.

Continues the work from #58739 which addressed the same issue but
stale-closed without review.

Fixes: #58735

Remove the suggestion to use child_process.spawn() with the shell
option set for running .bat and .cmd files on Windows. Passing
arguments through spawn with shell: true is deprecated (DEP0190)
due to shell injection risks. Keep the exec() and direct cmd.exe
spawn alternatives.

Fixes: nodejs#58735
@nodejs-github-bot nodejs-github-bot added child_process Issues and PRs related to the child_process subsystem. doc Issues and PRs related to the documentations. labels Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

child_process Issues and PRs related to the child_process subsystem. doc Issues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conflict between child_process API guidance and DEP0190

2 participants