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:
Christos Alexiou 2024-08-19 12:45:14 +03:00 committed by GitHub
commit 2d6d9746f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 2 deletions

View File

@ -44,8 +44,7 @@ fi
# randomise any unset environment variables
for ENV_VAR in "${ENV_VARS[@]}"
do
temp=$(eval "echo \$$ENV_VAR")
if [[ -z "${temp}" ]]; then
if [[ -z "${!ENV_VAR}" ]]; then
eval "export $ENV_VAR=$(uuidgen | sed -e 's/-//g')"
fi
done