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 #882

Merged
merged 1 commit into from
Jan 16, 2023
Merged

Conversation

copybara-service[bot]
Copy link

Return a non-zero exit code upon error

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.

Fixes #848

FUTURE_COPYBARA_INTEGRATE_REVIEW=#848 from abstractlyZach:return_nonzero 06b2d36

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

COPYBARA_INTEGRATE_REVIEW=#848 from abstractlyZach:return_nonzero 06b2d36
PiperOrigin-RevId: 502399096
@copybara-service copybara-service bot merged commit 4a22aab into master Jan 16, 2023
@copybara-service copybara-service bot deleted the test_502211842 branch January 16, 2023 17:49
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.

1 participant