Skip to content

Commit

Permalink
error code maybe null
Browse files Browse the repository at this point in the history
I've come across a case that on Windows machine running a watch parallel with jetty, sometimes it gives code = null, which will fail the scripts.
  • Loading branch information
jackysee committed Jan 16, 2015
1 parent 7ed038e commit f257546
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var exec = require('child_process').exec;

function potentialExit (childCmd, code) {
code = code.code || code;
code = code? (code.code || code) : code;
if (code > 0) {
console.error('`' + childCmd + '` failed with exit code ' + code);
process.exit(code);
Expand Down

0 comments on commit f257546

Please sign in to comment.