Update 01-config_yaml.sh

This commit is contained in:
Alexandre
2025-07-06 20:53:30 +02:00
committed by GitHub
parent a3ae134094
commit 5f9f38a67b

View File

@@ -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