Skip to content
Myr

add `execa.sync()` (#7)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sindre Sorhus · committed by Sindre Sorhus · parent d6e3220 · Browse files · 3 files+33 added−12 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+33 added−12 removed

  • other:+33 added−12 removed

3 files+33 added−12 removed

modified:index.js+19 added-11 removed
modified:readme.md+9 added-1 removed
55 unmodified lines
56## API5758### execa(file, [arguments], [options])5960Execute a file directly.60Execute a file.6162Same options as [`child_process.execFile`](https://nodejs.org/api/child_process.html#child_process_child_process_execfile_file_args_options_callback).6364Returns a promise for a result object with `stdout` and `stderr` properties. Additionally, the promise instance has a `pid` property (the ID of the child process) and a `kill` method (for sending signals to the child process).
11 unmodified lines
76Spawn a file.7778Same API as [`child_process.spawn`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options).7980### execa.sync(file, [arguments], [options])8182Execute a file synchronously.8384Same options as [`child_process.execFileSync`](https://nodejs.org/api/child_process.html#child_process_child_process_execfile_file_args_options_callback), except that the default encoding is `utf8` instead of `buffer`.8586Returns `stdout`.8788### options8990Additional exposed options:91
19 unmodified lines
modified:test.js+5 added