From cbf7ac9b3b542ea80f96cc0430a1ddabf764c886 Mon Sep 17 00:00:00 2001 From: Paul Bouchon Date: Sat, 11 Jul 2026 20:18:32 -0400 Subject: [PATCH] doc: fix execFile/execFileSync shell option docs The `shell` option for `execFile()` and `execFileSync()` was described as running `command` inside a shell, but those functions take a `file` argument, not `command`. The text was copied from `exec()`/`spawn()`. The note under `execFile()` also read "Since a shell is not spawned, behaviors such as I/O redirection and file globbing are not supported", which contradicts the preceding sentence that the same options as `exec()` (including `shell`) are supported. Change "Since" to "If" so it only applies when no shell is spawned. Fixes: https://github.com/nodejs/node/issues/32524 Signed-off-by: Paul Bouchon --- doc/api/child_process.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/child_process.md b/doc/api/child_process.md index e90759b16d3fa8..20d9406866dde0 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -373,7 +373,7 @@ changes: normally be created on Windows systems. **Default:** `false`. * `windowsVerbatimArguments` {boolean} No quoting or escaping of arguments is done on Windows. Ignored on Unix. **Default:** `false`. - * `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses + * `shell` {boolean|string} If `true`, runs `file` inside of a shell. Uses `'/bin/sh'` on Unix, and `process.env.ComSpec` on Windows. A different shell can be specified as a string. See [Shell requirements][] and [Default Windows shell][]. **Default:** `false` (no shell). @@ -390,7 +390,7 @@ except that it does not spawn a shell by default. Rather, the specified executable `file` is spawned directly as a new process making it slightly more efficient than [`child_process.exec()`][]. -The same options as [`child_process.exec()`][] are supported. Since a shell is +The same options as [`child_process.exec()`][] are supported. If a shell is not spawned, behaviors such as I/O redirection and file globbing are not supported. @@ -1175,7 +1175,7 @@ changes: **Default:** `'buffer'`. * `windowsHide` {boolean} Hide the subprocess console window that would normally be created on Windows systems. **Default:** `false`. - * `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses + * `shell` {boolean|string} If `true`, runs `file` inside of a shell. Uses `'/bin/sh'` on Unix, and `process.env.ComSpec` on Windows. A different shell can be specified as a string. See [Shell requirements][] and [Default Windows shell][]. **Default:** `false` (no shell).