As part of a heroku implementation I removed the database backend and used hard coded configuration values for users and groups. And after this I started getting configParser errors...
The reason was whitespace at the start of the line was being stripped, and so indentations were being removed... The trick is to set
IFS=''
Here's my version of your env script
scripts/envsubst.sh
#!/bin/bash
IFS=''
while read -r line ; do
while [[ "$line" =~ (\$\{[ a-zA-Z_][a-zA-Z_0-9]*(:[-=].*)?\}) ]] ; do
LHS=${BASH_REMATCH[1]}
RHS="$(eval echo "\"$LHS\"")"
# if [ -z "$RHS" ]; then
# echo Substituting "$LHS" with default value
# else
# echo Substituting "$LHS" from env
# fi
line=${line//$LHS/$RHS}
done
echo "$line"
done
As part of a heroku implementation I removed the database backend and used hard coded configuration values for users and groups. And after this I started getting configParser errors...
The reason was whitespace at the start of the line was being stripped, and so indentations were being removed... The trick is to set
Here's my version of your env script scripts/envsubst.sh