Merge pull request #14347 from Budibase/ops/fix-bug-in-randomisation
Fix: Handle setting of env vars in .env gracefully
This commit is contained in:
commit
2d6d9746f2
|
@ -44,8 +44,7 @@ fi
|
||||||
# randomise any unset environment variables
|
# randomise any unset environment variables
|
||||||
for ENV_VAR in "${ENV_VARS[@]}"
|
for ENV_VAR in "${ENV_VARS[@]}"
|
||||||
do
|
do
|
||||||
temp=$(eval "echo \$$ENV_VAR")
|
if [[ -z "${!ENV_VAR}" ]]; then
|
||||||
if [[ -z "${temp}" ]]; then
|
|
||||||
eval "export $ENV_VAR=$(uuidgen | sed -e 's/-//g')"
|
eval "export $ENV_VAR=$(uuidgen | sed -e 's/-//g')"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue