Skip to content

Instantly share code, notes, and snippets.

@dignifiedquire
Created October 22, 2012 11:27
Show Gist options
  • Save dignifiedquire/3931112 to your computer and use it in GitHub Desktop.
Save dignifiedquire/3931112 to your computer and use it in GitHub Desktop.
Test for exit code
var spawn = require('child_process').spawn;
var build = spawn('grunt', ['build']);
build.on('exit', function(code){
console.log('Exit: ' + code);
});
var test = spawn('grunt', ['test']);
test.on('exit', function(code){
console.log('Exit: ' + code);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment