diff --git a/app/start.sh b/app/start.sh index 68fbec173c..8472206b40 100755 --- a/app/start.sh +++ b/app/start.sh @@ -1,9 +1,26 @@ #!/bin/sh -# cd into the parent directory of the script, +# cd into the parent directory of the script, # so that the script generates virtual environments always in the same path. cd "${0%/*}" || exit 1 +echo "" +echo "Loading azd .env file from current environment" +echo "" + +while IFS='=' read -r key value; do + value=$(echo "$value" | sed 's/^"//' | sed 's/"$//') + # Only export variables that start with "VITE_" + case "$key" in + VITE_*) + export "$key=$value" + echo "Exported $key" + ;; + esac +done <