doc: fix execFile/execFileSync shell option docs#64437
Open
bitpshr wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes a few small inaccuracies in the
child_processdocs, all pointed out in #32524.The
shelloption forexecFile()andexecFileSync()says it runscommandinside a shell, but those functions take afileargument, notcommand. The wording was copied fromexec()/spawn(), wherecommandis 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 asexec()(includingshell) 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.