Skip to content
This repository has been archived by the owner on Nov 12, 2021. It is now read-only.

Commit

Permalink
fix: output buffer if code != 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Oct 22, 2019
1 parent 4a7eb33 commit 32bab56
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ exports.runScript = (script, folder, streaming) => {
})

child.on('exit', (code) => {
if (!streaming && buffer) {
if ((!streaming || code !== 0) && buffer) {
process.stdout.write(`${tag}\n${border}${processOutput(buffer)}`)
}
if (code !== 0) {
Expand All @@ -150,6 +150,5 @@ exports.killAll = () => {
}

nodeCleanup(() => {
console.log('nodeCleanup')
exports.killAll()
})

0 comments on commit 32bab56

Please sign in to comment.