Skip to content

Commit 0389e38

Browse files
kevinoidrvagg
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 <jasnell@gmail.com>
1 parent 5683efb commit 0389e38

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
@@ -184,7 +184,7 @@ replace the existing process and uses a shell to execute the command.*
184184

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

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

503503
### child_process.execFileSync(file[, args][, options])
504504

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

0 commit comments

Comments
 (0)