Skip to content

Commit df35988

Browse files
committed
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: nodejs#32524 Signed-off-by: Paul Bouchon <[email protected]>
1 parent 214cf06 commit df35988

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
@@ -378,7 +378,7 @@ changes:
378378
normally be created on Windows systems. **Default:** `false`.
379379
* `windowsVerbatimArguments` {boolean} No quoting or escaping of arguments is
380380
done on Windows. Ignored on Unix. **Default:** `false`.
381-
* `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses
381+
* `shell` {boolean|string} If `true`, runs `file` inside of a shell. Uses
382382
`'/bin/sh'` on Unix, and `process.env.ComSpec` on Windows. A different
383383
shell can be specified as a string. See [Shell requirements][] and
384384
[Default Windows shell][]. **Default:** `false` (no shell).
@@ -400,7 +400,7 @@ efficient than [`child_process.exec()`][].
400400
> cancellation, externally propagated aborts, and timeouts. See
401401
> [DEP0209](deprecations.md#dep0209-using-abortsignal-to-dispose-of-resources).
402402
403-
The same options as [`child_process.exec()`][] are supported. Since a shell is
403+
The same options as [`child_process.exec()`][] are supported. If a shell is
404404
not spawned, behaviors such as I/O redirection and file globbing are not
405405
supported.
406406

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

0 commit comments

Comments
 (0)