Better error handling in awsdeploy.sh

This commit is contained in:
Troy McConaghy 2017-01-22 16:20:13 +01:00
parent e7ffcf5705
commit 36eccb3f83

View File

@ -1,8 +1,10 @@
#!/bin/bash #!/bin/bash
# The set -e option instructs bash to immediately exit set -euo pipefail
# if any command has a non-zero exit status # -e Abort at the first failed line (i.e. if exit status is not 0)
set -e # -u Abort when undefined variable is used
# -o pipefail (Bash-only) Piped commands return the status
# of the last failed command, rather than the status of the last command
# Check for the first command-line argument # Check for the first command-line argument
# (the name of the AWS deployment config file) # (the name of the AWS deployment config file)