Skip to content

Instantly share code, notes, and snippets.

@josephjaniga
Created June 12, 2015 15:15
Show Gist options
  • Save josephjaniga/87639267eef9ded96fd1 to your computer and use it in GitHub Desktop.
Save josephjaniga/87639267eef9ded96fd1 to your computer and use it in GitHub Desktop.
Process.Exit(); Failure and Success Codes - SImulate Automation Result Codes
// 0 1 2
// node test.js #
var input = process.argv[2] || 1;
process.on('exit', function(code){
if ( code == 0 ){
console.log("success");
} else {
console.log("failure");
}
});
process.exit(input);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment