mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 03:21:05 +00:00
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:
parent
e4f2625b02
commit
f5f900a6e7
1 changed files with 12 additions and 3 deletions
15
bw-dev
15
bw-dev
|
@ -1,9 +1,18 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# import our ENV variables
|
# exit on errors
|
||||||
source .env
|
|
||||||
|
|
||||||
set -e
|
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
|
set -x
|
||||||
|
|
||||||
function clean {
|
function clean {
|
||||||
|
|
Loading…
Reference in a new issue