Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,16 @@ function runner(options, next) {

/*jslint unparam:true*/
exec(args.join(' ').trim(), function (err, stdout, stderr) {

return parseOutput(stderr, next);
}).on('exit', function (exitCode) {
process.exitCode = exitCode;
});
/*jslint unparam:false*/
});
}

process.on('exit', function () {
process.exit(process.exitCode);
Copy link

@MiniGod MiniGod Feb 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to do this. Setting process.exitCode above is enough.

https://nodejs.org/docs/latest/api/process.html#process_process_exitcode

process.exitCode
A number which will be the process exit code, when the process [...] exits gracefully

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On node.js 0.10 this is required.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@agirorn I suggest that your remove this now as node.js 0.10 is long out of support, The we should look at getting this landed

});

module.exports = runner;
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@
},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-cli": "^1.2.0",
"grunt-jslint": "~1.1.12",
"vows": "~0.7.0",
"grunt-vows": "~0.4.0"
"grunt-vows": "~0.4.0",
"vows": "~0.7.0"
}
}