Skip to content

Commit 2043e6a

Browse files
kevinoidMyles Borins
authored andcommitted
doc: clarify child_process.execFile{,Sync} file arg
The changes to the file argument of execFile in #4504 make it appear that execFile requires an absolute or relative path to the executable file, when it also supports a filename which will be resolved using $PATH. Although the example makes this clear, assuming there isn't a node binary in $CWD, it's easy to overlook. This commit clarifies that point. It also updates the argument description for execFileSync to match, since it was overlooked in #4504 and behaves identically. PR-URL: #5310 Reviewed-By: James M Snell <[email protected]>
1 parent 8c732ad commit 2043e6a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/api/child_process.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ replace the existing process and uses a shell to execute the command.*
183183

184184
### child_process.execFile(file[, args][, options][, callback])
185185

186-
* `file` {String} A path to an executable file
186+
* `file` {String} The name or path of the executable file to run
187187
* `args` {Array} List of string arguments
188188
* `options` {Object}
189189
* `cwd` {String} Current working directory of the child process
@@ -497,7 +497,7 @@ configuration at startup.
497497

498498
### child_process.execFileSync(file[, args][, options])
499499

500-
* `file` {String} The filename of the program to run
500+
* `file` {String} The name or path of the executable file to run
501501
* `args` {Array} List of string arguments
502502
* `options` {Object}
503503
* `cwd` {String} Current working directory of the child process

0 commit comments

Comments
 (0)