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

Return a non-zero exit code upon error #848

Closed
wants to merge 2 commits into from

Conversation

abstractlyZach
Copy link
Contributor

This brings us in line with the Unix standard of returning non-zero for a failed command:
https://www.gnu.org/software/bash/manual/html_node/Exit-Status.html

Also, this will allow any callers (like google-java-format-diff.py) to respond appropriately.
A change needed to be reverted because google-java-format-diff.py
was failing silently, so the author wasn't aware that their change caused a pre-upload hook to stop working.

This brings us in line with the Unix standard of returning non-zero for
a failed command:
https://www.gnu.org/software/bash/manual/html_node/Exit-Status.html

Also, this will allow any callers (like google-format-java-diff.py) to respond
appropriately.
copybara-service bot pushed a commit that referenced this pull request Jan 16, 2023
This brings us in line with the Unix standard of returning non-zero for a failed command:
https://www.gnu.org/software/bash/manual/html_node/Exit-Status.html

Also, this will allow any callers (like google-java-format-diff.py) to respond appropriately.
[A change](http://r.android.com/2257232) needed to be reverted because `google-java-format-diff.py`
was failing silently, so the author wasn't aware that their change caused a pre-upload hook to stop working.

Fixes #848

FUTURE_COPYBARA_INTEGRATE_REVIEW=#848 from abstractlyZach:return_nonzero 06b2d36
PiperOrigin-RevId: 502211842
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.

None yet

3 participants