Skip to content

Commit

Permalink
ENG-5543 Fixes another unbound variable issue when variable is not pr…
Browse files Browse the repository at this point in the history
…ovided on environment
  • Loading branch information
w-caffiero-entando committed Feb 26, 2025
1 parent 295f196 commit 20bf7f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ set -eu
ENV_DOMAIN=${DOMAIN:-""}

ENV_JSON='{'
[ -n "$DOMAIN" ] && ENV_JSON+='"DOMAIN":"'"$ENV_DOMAIN"'", '
[ -n "$DOMAIN_CM" ] && ENV_JSON+='"DOMAIN_CM":"'"$DOMAIN_CM"'", '
[ -n "$KEYCLOAK_JSON" ] && ENV_JSON+='"KEYCLOAK_JSON":"'"$ENV_KEYCLOAK_JSON"'", '
[ -n "$ENTANDO_VIRTUAL_CONTEXTS" ] && ENV_JSON+='"ENTANDO_VIRTUAL_CONTEXTS":"'"$ENTANDO_VIRTUAL_CONTEXTS"'"'
[ -n "${DOMAIN:-""}" ] && ENV_JSON+='"DOMAIN":"'"$ENV_DOMAIN"'", '
[ -n "${DOMAIN_CM:-""}" ] && ENV_JSON+='"DOMAIN_CM":"'"$DOMAIN_CM"'", '
[ -n "${KEYCLOAK_JSON:-""}" ] && ENV_JSON+='"KEYCLOAK_JSON":"'"$KEYCLOAK_JSON"'", '
[ -n "${ENTANDO_VIRTUAL_CONTEXTS:-""}" ] && ENV_JSON+='"ENTANDO_VIRTUAL_CONTEXTS":"'"$ENTANDO_VIRTUAL_CONTEXTS"'"'
ENV_JSON+='}'

ESCAPED_ENV_JSON=$(echo $ENV_JSON | sed 's/\"/\\\"/g' | sed 's/\//\\\//g' | tr -d '\n' | tr -d '[[:blank:]]')
Expand Down
Empty file added test.html
Empty file.

0 comments on commit 20bf7f4

Please sign in to comment.