set -e inside a Bash script, the hard way.For those who are curious,
set -e tells a Bash script to exit if any commands return a non-zero exit status (failure). It is important to have this in pre-commit or pre-deploy scripts. Otherwise, you are relying only on the return value of the last command in the script. If any previous command fails, the script returns a success status.