Skip to content

Commit e382064

Browse files
authored
Merge pull request pelias#94 from dr0i/93-warnDATA_DIR
Warn if DATA_DIR is already set
2 parents fbb7dc4 + c7913ae commit e382064

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/env.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ function env_check(){
2424
# loads environment vars from a stream (such as a file)
2525
# example: env_load_stream < .env
2626
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"
2728
while IFS='=' read -r key value; do
2829
([ -z $key ] || [ -z $value ]) && printf 'Invalid environment var "%s=%s"\n' $key $value && exit 1
2930
if [ -z ${!key} ]; then

0 commit comments

Comments
 (0)