Skip to content

Commit

Permalink
Return an .all property in the result
Browse files Browse the repository at this point in the history
  • Loading branch information
lunaticmonk committed Jan 22, 2019
1 parent 2210988 commit ce2da69
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Expand Up @@ -275,9 +275,12 @@ module.exports = (command, args, options) => {
getStream(spawned, 'stdout', {encoding, buffer, maxBuffer}),
getStream(spawned, 'stderr', {encoding, buffer, maxBuffer})
]).then(arr => {


const result = arr[0];
result.stdout = arr[1];
result.stderr = arr[2];
result.all = `${result.stdout} ${result.stderr}`;

if (result.error || result.code !== 0 || result.signal !== null) {
const error = makeError(result, {
Expand All @@ -301,6 +304,7 @@ module.exports = (command, args, options) => {
return {
stdout: handleOutput(parsed.options, result.stdout),
stderr: handleOutput(parsed.options, result.stderr),
all: handleOutput(parsed.options, result.all),
code: 0,
failed: false,
killed: false,
Expand Down

0 comments on commit ce2da69

Please sign in to comment.