In a bash script I do a
git push
and I check its exit status.
On the remote server there's a post-receive hook which does a few things. If an error occurs the post-receive hook will exit with a non-zero value.
However when the post-receive hook errors out, git push exits normally. Unless I'm specifically checking the output for specific error strings (which I'm not) my script thinks everything went ok.
Is there an easy way for me to determine if the post-receive hook failed?
git push
command rather than just its exit status? Perhaps the hook failure is detectable somewhere in the output which is formatted as:<flag> <summary> <from> -> <to> (<reason>)
. Just thinking out loud... – Bissonnette