Skip to content

doc: fix execFile/execFileSync shell option docs#64437

Open
bitpshr wants to merge 1 commit into
nodejs:mainfrom
bitpshr:doc/child-process-execfile-shell
Open

doc: fix execFile/execFileSync shell option docs#64437
bitpshr wants to merge 1 commit into
nodejs:mainfrom
bitpshr:doc/child-process-execfile-shell

Conversation

@bitpshr

@bitpshr bitpshr commented Jul 12, 2026

Copy link
Copy Markdown

This fixes a few small inaccuracies in the child_process docs, all pointed out in #32524.

The shell option for execFile() and execFileSync() says it runs command inside a shell, but those functions take a file argument, not command. The wording was copied from exec()/spawn(), where command is correct.

The note under execFile() also reads "Since a shell is not spawned, behaviors such as I/O redirection and file globbing are not supported", which contradicts the line right before it saying the same options as exec() (including shell) are supported. Changing "Since" to "If" makes it only apply when there's no shell.

I left the exec-vs-execFile "difference" wording (also mentioned in the issue) alone, since it isn't wrong as written and looked more like a judgment call for a maintainer.

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 <mail@bitpshr.net>
@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 Jul 12, 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.

2 participants