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

Adding exit codes to cli commands #11735

Merged
merged 4 commits into from
Dec 13, 2022
Merged

Adding exit codes to cli commands #11735

merged 4 commits into from
Dec 13, 2022

Conversation

james-prysm
Copy link
Contributor

What type of PR is this?

Bug fix

What does this PR do? Why is it needed?
the cli library we use https://cli.urfave.org/v2/examples/exit-codes/ by default sets the exit code to 0 even if errors occurred. in order for our cli commands to return a '1' for exit code on failure we need to explicitly wrap the action for the cli

Which issues(s) does this PR fix?

Fixes #11715

@james-prysm james-prysm requested a review from a team as a code owner December 7, 2022 22:40
@james-prysm james-prysm self-assigned this Dec 7, 2022
@james-prysm james-prysm added UX cosmetic / user experience related Bug Something isn't working labels Dec 7, 2022
@rkapka
Copy link
Contributor

rkapka commented Dec 8, 2022

Wouldn't it make sense to return the 1 error code everywhere?

@prylabs-bulldozer prylabs-bulldozer bot merged commit 043079d into develop Dec 13, 2022
@delete-merged-branch delete-merged-branch bot deleted the exit-code branch December 13, 2022 12:13
roberto-bayardo pushed a commit to roberto-bayardo/prysm that referenced this pull request Dec 17, 2022
* adding exit codes to cmd

* adding in fatal logs to other cli actions

Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working UX cosmetic / user experience related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong exit codes when validator doesn't run
2 participants