From 5f9f38a67b90d7bf198a10ef9a0a9f4ec226b812 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sun, 6 Jul 2025 20:53:30 +0200 Subject: [PATCH] Update 01-config_yaml.sh --- .templates/01-config_yaml.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.templates/01-config_yaml.sh b/.templates/01-config_yaml.sh index 218c2b129..69b62ef83 100644 --- a/.templates/01-config_yaml.sh +++ b/.templates/01-config_yaml.sh @@ -183,7 +183,9 @@ while IFS= read -r line; do # export to python if command -v "python3" &>/dev/null; then [ ! -f /env.py ] && echo "import os" >/env.py - echo "os.environ['${KEYS}'] = '${VALUE//[\"\']/}'" >>/env.py + # Escape single quotes in VALUE + VALUE_ESCAPED="${VALUE//\'/\'\"\'\"\'}" + echo "os.environ['${KEYS}'] = '${VALUE_ESCAPED}'" >> /env.py python3 /env.py fi # set .env