GitHub bot: fix linting issues (nobuild)

This commit is contained in:
github-actions
2025-07-07 06:11:38 +00:00
parent d5854da450
commit 0482d792c6

View File

@@ -169,28 +169,28 @@ while IFS= read -r line; do
export "$line" export "$line"
# export to python # export to python
if command -v "python3" &>/dev/null; then if command -v "python3" &>/dev/null; then
[ ! -f /env.py ] && echo "import os" > /env.py [ ! -f /env.py ] && echo "import os" >/env.py
# Escape single quotes in VALUE # Escape single quotes in VALUE
VALUE_ESCAPED="${VALUE//\'/\'\"\'\"\'}" VALUE_ESCAPED="${VALUE//\'/\'\"\'\"\'}"
echo "os.environ['${KEYS}'] = '${VALUE_ESCAPED}'" >> /env.py echo "os.environ['${KEYS}'] = '${VALUE_ESCAPED}'" >>/env.py
python3 /env.py python3 /env.py
fi fi
# set .env # set .env
echo "$line" >> /.env echo "$line" >>/.env
# set environment # set environment
mkdir -p /etc mkdir -p /etc
echo "$line" >> /etc/environment echo "$line" >>/etc/environment
# Export to scripts # Export to scripts
if cat /etc/services.d/*/*run* &>/dev/null; then sed -i "1a export $line" /etc/services.d/*/*run* 2>/dev/null; fi if cat /etc/services.d/*/*run* &>/dev/null; then sed -i "1a export $line" /etc/services.d/*/*run* 2>/dev/null; fi
if cat /etc/cont-init.d/*run* &>/dev/null; then sed -i "1a export $line" /etc/cont-init.d/*run* 2>/dev/null; fi if cat /etc/cont-init.d/*run* &>/dev/null; then sed -i "1a export $line" /etc/cont-init.d/*run* 2>/dev/null; fi
# For s6 # For s6
if [ -d /var/run/s6/container_environment ]; then printf "%s" "${VALUE}" > /var/run/s6/container_environment/"${KEYS}"; fi if [ -d /var/run/s6/container_environment ]; then printf "%s" "${VALUE}" >/var/run/s6/container_environment/"${KEYS}"; fi
echo "export $line" >> ~/.bashrc echo "export $line" >>~/.bashrc
# Show in log # Show in log
if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi
else else
bashio::log.red "Skipping line that does not follow the correct structure: $line" bashio::log.red "Skipping line that does not follow the correct structure: $line"
fi fi
done < "/tempenv" done <"/tempenv"
rm /tempenv rm /tempenv