mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01:00
GitHub bot: fix linting issues (nobuild)
This commit is contained in:
@@ -159,7 +159,7 @@ while IFS= read -r line; do
|
||||
# extract keys and values
|
||||
KEYS="${line%%=*}"
|
||||
VALUE="${line#*=}"
|
||||
# Check if VALUE is quoted
|
||||
# Check if VALUE is quoted
|
||||
if [[ "$VALUE" != \"*\" || "$VALUE" == '' ]]; then
|
||||
VALUE="\"$VALUE\""
|
||||
fi
|
||||
@@ -168,9 +168,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
|
||||
# Escape single quotes in VALUE
|
||||
VALUE_ESCAPED="${VALUE//\'/\'\"\'\"\'}"
|
||||
echo "os.environ['${KEYS}'] = '${VALUE_ESCAPED}'" >> /env.py
|
||||
# Escape single quotes in VALUE
|
||||
VALUE_ESCAPED="${VALUE//\'/\'\"\'\"\'}"
|
||||
echo "os.environ['${KEYS}'] = '${VALUE_ESCAPED}'" >>/env.py
|
||||
python3 /env.py
|
||||
fi
|
||||
# set .env
|
||||
|
||||
Reference in New Issue
Block a user