From ce2da69e5c9b4ebb44526be5c93e90263e73b4fb Mon Sep 17 00:00:00 2001 From: Sumedh Nimkarde Date: Tue, 22 Jan 2019 13:33:30 +0530 Subject: [PATCH] Return an .all property in the result --- index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.js b/index.js index 0610a581cc..cdea192876 100644 --- a/index.js +++ b/index.js @@ -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, { @@ -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,