Skip to content

doc: improve child_process.execFile() code example

Rodrigo Muino Tomonari requested to merge github/fork/ryansobol/execFile into master

The current code example for child_process.execFile() doesn't work even on Unix-like platforms. Since there's no shell wrapper,

  1. file must be a relative or absolute path to executable.
  2. args must contain all the command line arguments for file.
  3. I/O redirection and file globbing is not possible.

Here's an alternative I whipped up that should work on both Unix and Windows platforms. Suggestions welcome.

Merge request reports

Loading