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?