Skip to content

doc: fix execFile/execFileSync shell option docs - #64437

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
bitpshr:doc/child-process-execfile-shell
Nov 6, 2026
Merged

nodejs-github-bot merged 1 commit into
nodejs:mainfrom
bitpshr:doc/child-process-execfile-shell

Conversation

@bitpshr

@bitpshr bitpshr commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

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.

@nodejs-github-bot nodejs-github-bot added child_process Issues and PRs related to the child_process subsystem. doc Issues and PRs related to Node.js documentation. labels Jul 12, 2026
@bitpshr

bitpshr commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Hey @nodejs/documentation, just want to keep this on your radar. It's a small fix to the child_process docs: the shell option wording for execFile()/execFileSync() says it runs command, but those functions take a file argument. Whenever someone has a moment.

@trivikr

trivikr commented Aug 24, 2026

Copy link
Copy Markdown
Member

This needs a rebase.

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>
@bitpshr
bitpshr force-pushed the doc/child-process-execfile-shell branch from cbf7ac9 to df35988 Compare August 24, 2026 12:35
@bitpshr

bitpshr commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

@trivikr rebased and ready, thanks!

@trivikr
trivikr self-requested a review August 24, 2026 17:50
@bitpshr

bitpshr commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

Hi @nodejs/documentation, keeping this on your radar. Small doc fix, green since July, rebased and ready. Happy to rebase again if it has gone stale.

@trivikr trivikr added author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. labels Nov 6, 2026
@nodejs-github-bot
nodejs-github-bot merged commit 6720aad into nodejs:main Nov 6, 2026
31 of 32 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 6720aad

@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Nov 6, 2026
aduh95 pushed a commit that referenced this pull request Nov 11, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. child_process Issues and PRs related to the child_process subsystem. doc Issues and PRs related to Node.js documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants