Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.