-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
Exit if pre-up hook exits non-zero #289
Conversation
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.
LGTM, actually. Thanks for catching this.
|
||
if [ "$hook_ret" -ne 0 ]; then | ||
echo "$when-$direction hook exited non-zero ($hook_ret)" >&2 | ||
exit $hook_ret # NB. this only exits the while-read; caller must still check and exit |
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.
Whoa, that's good to know. Normally I don't love code comments but I definitely would have missed that quirk.
Sweet. Thanks for the quick review! Should be good to merge now. |
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.
Thanks for this. I can merge it Friday, and see if I can get a release out this year. 'Tis the season!
This allows scripts to bail early if a check fails.
88f6fc7
to
453e88b
Compare
Thanks. Also adding one for the down case. |
No description provided.