From 23ce40c8169db82b803555bb6962e3d21b124f65 Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Fri, 9 Feb 2024 13:35:58 +0900 Subject: [PATCH] fix variables with spaces not working in deployment script --- infrastructure/deployment/deploy.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/infrastructure/deployment/deploy.sh b/infrastructure/deployment/deploy.sh index cfb8e12e0..426cb14d3 100755 --- a/infrastructure/deployment/deploy.sh +++ b/infrastructure/deployment/deploy.sh @@ -79,7 +79,9 @@ echo $COMPOSE_FILES_USED # .env.production if [ -f $PROJECT_ROOT/.env.$ENV ] then - export $(cat $PROJECT_ROOT/.env.$ENV | sed 's/#.*//g' | xargs) + while IFS='' read -r line || [[ -n "$line" ]]; do + eval "export $line" + done < $PROJECT_ROOT/.env.$ENV fi trap trapint SIGINT SIGTERM