Figured out a way to give a nice error message

This way if we fail to parse old .env's folks should be able to figure
it out
This commit is contained in:
Joel Bradshaw 2020-11-19 17:44:46 -08:00
parent e4f2625b02
commit f5f900a6e7

15
bw-dev
View file

@ -1,9 +1,18 @@
#!/bin/bash
# import our ENV variables
source .env
# exit on errors
set -e
# import our ENV variables
# catch exits and give a friendly error message
function showerr {
echo "Failed to load configuration! You may need to update your .env and quote values with special characters in them."
}
trap showerr EXIT
source .env
trap - EXIT
# show commands as they're executed
set -x
function clean {