From 45de8696bc1815fbf18c504449420a4d8c713350 Mon Sep 17 00:00:00 2001 From: Niels V Date: Mon, 18 Nov 2024 14:02:47 +0100 Subject: [PATCH] safer comparison of MODE env var fixes #22 As mentioned there in the current setup one would still have the sh parser trip over a use case like ``` export MODE="my mode" ./start.sh: line 4: [: too many arguments ``` --- start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start.sh b/start.sh index 46e4931..0ff93e5 100644 --- a/start.sh +++ b/start.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash set -eu -if [ ${MODE:-""} == "development" ]; then +if [ "${MODE}" == "development" ]; then if [ -f /app/requirements.txt ]; then pip install -r /app/requirements.txt; fi exec python web.py else