Skip to content

Commit

Permalink
We need generate-docker-env *not* to load the existing .env itself wh…
Browse files Browse the repository at this point in the history
…en it is run as part of a get-teamware upgrade, since that would overwrite the variables we have just been carefully gathering from the user
  • Loading branch information
ianroberts committed Jul 30, 2023
1 parent b1cbc4f commit 74c44c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion generate-docker-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ if [ -f .env ]; then
cp .env saved-env.$BAKNAME

# load any existing environment variables from .env
. .env
if [ -z "$SKIP_EXISTING_ENV" ]; then
. .env
fi
sed -n '/^### generate-docker-env\.sh will not touch anything below this line/,$p' .env | sed 1d > .env.tmpsave
fi

Expand Down
2 changes: 2 additions & 0 deletions install/get-teamware.sh
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ chmod 644 nginx/*.template Caddyfile

echo "Generating configuration file"

# tell generate-docker-env not to load an existing .env itself, since we already have
SKIP_EXISTING_ENV=yes
source ./generate-docker-env.sh

if [ "${COMPOSE[0]/ /_}" = "${COMPOSE[0]}" ]; then
Expand Down

0 comments on commit 74c44c6

Please sign in to comment.