From 8813ceb3ceb87ce275d2a55daf6dc33e296bcf83 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Fri, 31 May 2019 14:24:49 -0700 Subject: [PATCH] Cant use stdio inherit and stash a result away --- scripts/run-sequence.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/run-sequence.js b/scripts/run-sequence.js index ef7a384af4c..f014cde1b91 100644 --- a/scripts/run-sequence.js +++ b/scripts/run-sequence.js @@ -5,12 +5,13 @@ const cp = require("child_process"); * @param {[string, string[]][]} tasks * @param {cp.SpawnSyncOptions} opts */ -function runSequence(tasks, opts = { timeout: 100000, shell: true, stdio: "inherit" }) { +function runSequence(tasks, opts = { timeout: 100000, shell: true }) { let lastResult; for (const task of tasks) { console.log(`${task[0]} ${task[1].join(" ")}`); const result = cp.spawnSync(task[0], task[1], opts); if (result.status !== 0) throw new Error(`${task[0]} ${task[1].join(" ")} failed: ${result.stderr && result.stderr.toString()}`); + console.log(result.stdout && result.stdout.toString()); lastResult = result; } return lastResult && lastResult.stdout && lastResult.stdout.toString();