-
Notifications
You must be signed in to change notification settings - Fork 18
chore: avoid masking errors in docker validation script #689
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
Conversation
|
After adding |
| else | ||
| exit $exit_status |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't set -o pipefail exit with the non-zero status code? I might be missing something, but Is this check needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good question! Just tried it out in f48fb2d but unfortunately, it looks like we still need the check otherwise the script results in an exit 0 even when the command results in an error:
ERROR: (gcloud.container.images.describe) [:latest] digest must be of the form "sha256:<digest>".
+ exit_status=1
cleanup
[ID: 8899040] Command finished after 23 secs, exit value: 0
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> ☕️
If you write sample code, please follow the samples format.