Return non-zero exit codes when something goes wrong (WIP) #54
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This close #52
Some references around the web (like this) tells that is a standard to return a value of
0
when the command performed successfully and a value different form0
otherwise.So this is the
exit_status
table for our project:IMPORTANT
I think this PR will never solve the related issue: there is an unresolvable conflict between
Kernel::exit
andsimplecov
gem. Maybe the cause is related toat_exit
callback used by simplecov. I noticed many unpredictable weirds behaviors. I tried to keep tests green and full coverage, with many tricks and workarounds but I lost the challenge.NB. The statement with
Kernel::exit
method is not covered by default by ruby built-in coverage mechanism, so in any case we'll get a100%
coverage result when using this method.