File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ function env_check(){
24
24
# loads environment vars from a stream (such as a file)
25
25
# example: env_load_stream < .env
26
26
function env_load_stream(){
27
+ [[ -n $DATA_DIR ]] && printf " DATA_DIR is already set to '$DATA_DIR ' - this may cause the DATA_DIR specified in the .env to be ignored\n"
27
28
while IFS=' =' read -r key value; do
28
29
([ -z $key ] || [ -z $value ]) && printf ' Invalid environment var "%s=%s"\n' $key $value && exit 1
29
30
if [ -z ${! key} ]; then
@@ -37,8 +38,6 @@ function env_load_stream(){
37
38
# ensure locale is correctly set?
38
39
# export LC_ALL=en_US.UTF-8
39
40
40
- # warn if DATA_DIR is already set
41
- [[ -n $DATA_DIR ]] && printf " DATA_DIR is already set to '$DATA_DIR ' - this may cause the DATA_DIR specified in the .env to be ignored\n"
42
41
# load DATA_DIR and other vars from docker-compose .env file
43
42
# note: strips comments and empty lines
44
43
[ -f .env ] && env_load_stream < <( grep -v ' ^$\|^\s*$\#' .env)
You can’t perform that action at this time.
0 commit comments