If we want a Bash script to stop executing the rest of the script when one of the commands fail, we can simply add set -e to the top of our script.

set -e