Skip to content

Commit

Permalink
include stdout in runSequence thrown error
Browse files Browse the repository at this point in the history
  • Loading branch information
weswigham committed Sep 2, 2020
1 parent 62a1b35 commit 3a75838
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/run-sequence.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function runSequence(tasks, opts = { timeout: 100000, shell: true }) {
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()}`);
if (result.status !== 0) throw new Error(`${task[0]} ${task[1].join(" ")} failed: ${result.stderr && "stderr: " + result.stderr.toString()}${result.stdout && "\nstdout: " + result.stdout.toString()}`);
console.log(result.stdout && result.stdout.toString());
lastResult = result;
}
Expand Down

0 comments on commit 3a75838

Please sign in to comment.