fix(install): Only use .env for fallbacks

This fixes a serious bug in install.sh where it ignored externaly set env variable values such as `SENTRY_IMAGE` in favor of the ones defined in `.env`, essentially making all our e2e tests usless.
This commit is contained in:
Burak Yigit Kaya 2020-10-03 01:30:56 +03:00
parent de2b610fc3
commit e333dbd56a
No known key found for this signature in database
GPG Key ID: C2F03C406631065D

View File

@ -1,8 +1,8 @@
#!/usr/bin/env bash
set -e
# With a tip o' the hat to https://unix.stackexchange.com/a/79077
set -a && . ./.env && set +a
# Read .env for default values with a tip o' the hat to https://stackoverflow.com/a/59831605/90297
t=$(mktemp) && export -p > "$t" && set -a && . ./.env && set +a && . "$t" && rm "$t" && unset t
dc="docker-compose --no-ansi"
dcr="$dc run --rm"