From 90a33b23711cf30628cbdcc178687c5fbf848d55 Mon Sep 17 00:00:00 2001 From: naskya Date: Mon, 4 Mar 2024 00:59:00 +0900 Subject: [PATCH] chore (dev): check if URL has been set in dev/docker-entrypoint.sh --- dev/docker-entrypoint.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dev/docker-entrypoint.sh b/dev/docker-entrypoint.sh index 2f2e6b38f0..5d083cf728 100755 --- a/dev/docker-entrypoint.sh +++ b/dev/docker-entrypoint.sh @@ -23,9 +23,12 @@ if [ ! -f '/.firefish_env_initialized' ]; then # Configuring a new server cd /firefish cp .config/devenv.yml .config/default.yml - URL="$(echo "${URL}" | sed 's#/#\\/#g')" - sed -i'.bak' "s/http:\/\/localhost:3000/${URL}/g" .config/default.yml - rm .config/defaut.yml.bak + + if [ -n "${URL-}" ]; then + URL="$(echo "${URL}" | sed 's#/#\\/#g')" + sed -i'.bak' "s/http:\/\/localhost:3000/${URL}/g" .config/default.yml + rm .config/defaut.yml.bak + fi fi