Skip to content

Commit

Permalink
process feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
SamVerschueren committed Dec 28, 2016
1 parent 8bc78da commit 9c27906
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ module.exports.sync = (cmd, args, opts) => {
const result = childProcess.spawnSync(parsed.cmd, parsed.args, parsed.opts);

if (result.error || result.status !== 0) {
throw result.error || new Error(result.stdout === '' ? result.stderr : result.stdout);
throw (result.error || new Error(result.stdout === '' ? result.stderr : result.stdout));
}

result.stdout = handleOutput(parsed.opts, result.stdout);
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Same options as [`child_process.execFileSync`](https://nodejs.org/api/child_proc

Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options).

This method throws an `Error` if something is written to `stderr`.
This method throws an `Error` if the command fails.

### execa.shellSync(file, [options])

Expand Down

0 comments on commit 9c27906

Please sign in to comment.