Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix exit code. #32

Merged
merged 1 commit into from
Jul 15, 2019
Merged

Fix exit code. #32

merged 1 commit into from
Jul 15, 2019

Conversation

XhmikosR
Copy link
Owner

@XhmikosR XhmikosR commented Jul 15, 2019

Fixes #31

@XhmikosR XhmikosR requested a review from Johann-S July 15, 2019 07:55
@@ -52,6 +52,8 @@ function main(args) {
}

spinner.stop();

process.exit(unusedList.length);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't we follow some rules about command lines exit codes? For example: https://www.tldp.org/LDP/abs/html/exitcodes.html

Copy link
Owner Author

Choose a reason for hiding this comment

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

Well, it depends. If no error occurs, we exit with 0. Then instead of 1 we just exit with >=1.

Either way works for me, but this solution has the advantage you can tell the number of unused variables by the exit code.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would prefer to display clearly the number of unused variables instead of an error code which shows that, but your call here

@XhmikosR XhmikosR merged commit d1215bd into master Jul 15, 2019
@XhmikosR XhmikosR deleted the patch-1 branch July 15, 2019 13:45
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.

Exit code (v0.4.0)
2 participants