Skip to content

Commit 9638423

Browse files
bitpshraduh95
authored andcommitted
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: #32524 Signed-off-by: Paul Bouchon <mail@bitpshr.net> PR-URL: #64437 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent edb6ab2 commit 9638423

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎doc/api/child_process.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ changes:
379379
normally be created on Windows systems. **Default:** `false`.
380380
* `windowsVerbatimArguments` {boolean} No quoting or escaping of arguments is
381381
done on Windows. Ignored on Unix. **Default:** `false`.
382-
* `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses
382+
* `shell` {boolean|string} If `true`, runs `file` inside of a shell. Uses
383383
`'/bin/sh'` on Unix, and `process.env.ComSpec` on Windows. A different
384384
shell can be specified as a string. See [Shell requirements][] and
385385
[Default Windows shell][]. **Default:** `false` (no shell).
@@ -401,7 +401,7 @@ efficient than [`child_process.exec()`][].
401401
> cancellation, externally propagated aborts, and timeouts. See
402402
> [DEP0209](deprecations.md#dep0209-using-abortsignal-to-dispose-of-resources).
403403
404-
The same options as [`child_process.exec()`][] are supported. Since a shell is
404+
The same options as [`child_process.exec()`][] are supported. If a shell is
405405
not spawned, behaviors such as I/O redirection and file globbing are not
406406
supported.
407407

@@ -1203,7 +1203,7 @@ changes:
12031203
**Default:** `'buffer'`.
12041204
* `windowsHide` {boolean} Hide the subprocess console window that would
12051205
normally be created on Windows systems. **Default:** `false`.
1206-
* `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses
1206+
* `shell` {boolean|string} If `true`, runs `file` inside of a shell. Uses
12071207
`'/bin/sh'` on Unix, and `process.env.ComSpec` on Windows. A different
12081208
shell can be specified as a string. See [Shell requirements][] and
12091209
[Default Windows shell][]. **Default:** `false` (no shell).

0 commit comments

Comments
 (0)