Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
feross committed Apr 7, 2017
1 parent 2b1febe commit ffa91cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bin/cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ var argv = minimist(process.argv.slice(2), {
if (!process.stdin.isTTY || argv._[0] === '-' || argv.stdin) {
var snazzy = new CompactToStylishStream()

// Set the process exit code based on whether snazzy found errors.
// Set the process exit code based on whether snazzy found errors
process.on('exit', function (code) {
if (code === 0 && snazzy.exitCode !== 0) {
process.exit(snazzy.exitCode)
process.exitCode = snazzy.exitCode
}
})

process.stdout.on('error', function () {})
process.stdin.pipe(snazzy).pipe(process.stdout)
} else {
console.error(`
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ function CompactToStylishStream (opts) {
}
stream.Transform.call(this, opts)

this.exitCode = 0
this._buffer = []
}

Expand Down

0 comments on commit ffa91cc

Please sign in to comment.