Skip to content

Conversation

@agirorn
Copy link

@agirorn agirorn commented Feb 22, 2017

This will allow users to run node-cpplint in shell scripts and not force
them to use grunt-cpplint when that is not necessary.

node-cpplint src/** || echo "The C++ lint failed with exit code $?"

I was unable to get the tests to work for this because I do not know how to stub process.on and reset the process.exitCode in vowsjs testing framework.

This will allow users to run node-cpplint in shell scripts and not force
them to use grunt-cpplint when that is not necessary.

node-cpplint src/** || echo "The C++ lint failed with exit code $?"
}

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants