Skip to content

Commit e9089d3

Browse files
committed
doc: fixes default shell in child_process.md
Clarifies that the default shell in Windows is process.env.ComSpec and that cmd.exe is only used as a fallback. Functions whose descriptions are affected include: child_process.spawn, child_process.exec, child_process.spawnSync, and child_process.execSync. Fixes: #14156
1 parent 1a07c2a commit e9089d3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/api/child_process.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,8 @@ changes:
385385
* `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses
386386
`'/bin/sh'` on UNIX, and `'process.env.ComSpec'` on Windows. If
387387
`'process.env.ComSpec'` is unavailable, uses `'cmd.exe'` on Windows instead.
388-
A different shell can be specified as a string. The shell should understand
389-
the `-c` switch on UNIX, or `/d /s /c` on Windows. Defaults to `false` (no shell).
388+
A different shell can be specified as a string. The shell should understand the
389+
`-c` switch on UNIX, or `/d /s /c` on Windows. Defaults to `false` (no shell).
390390
* Returns: {ChildProcess}
391391

392392
The `child_process.spawn()` method spawns a new process using the given
@@ -780,8 +780,8 @@ changes:
780780
* `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses
781781
`'/bin/sh'` on UNIX, and `'process.env.ComSpec'` on Windows. If
782782
`'process.env.ComSpec'` is unavailable, uses `'cmd.exe'` on Windows instead.
783-
A different shell can be specified as a string. The shell should understand
784-
the `-c` switch on UNIX, or `/d /s /c` on Windows. Defaults to `false` (no shell).
783+
A different shell can be specified as a string. The shell should understand the
784+
`-c` switch on UNIX, or `/d /s /c` on Windows. Defaults to `false` (no shell).
785785
* Returns: {Object}
786786
* `pid` {number} Pid of the child process
787787
* `output` {Array} Array of results from stdio output

0 commit comments

Comments
 (0)