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:
@@ -2,7 +2,8 @@
|
||||
# shellcheck shell=bash
|
||||
set -euo pipefail
|
||||
|
||||
slug="${HOSTNAME/-/_}" ; slug="${slug#*_}"
|
||||
slug="${HOSTNAME/-/_}"
|
||||
slug="${slug#*_}"
|
||||
|
||||
# CONFIG FILE
|
||||
if [[ ! -f /config/configuration.yaml && ! -f /config/configuration.json ]]; then
|
||||
@@ -31,8 +32,10 @@ fi
|
||||
|
||||
chmod -R 755 "$(dirname "$CONFIGSOURCE")"
|
||||
|
||||
HAS_PYTHON=false; command -v python3 &>/dev/null && HAS_PYTHON=true
|
||||
HAS_YQ=false; command -v yq &>/dev/null && HAS_YQ=true
|
||||
HAS_PYTHON=false
|
||||
command -v python3 &>/dev/null && HAS_PYTHON=true
|
||||
HAS_YQ=false
|
||||
command -v yq &>/dev/null && HAS_YQ=true
|
||||
|
||||
$HAS_PYTHON || bashio::log.yellow "python3 not found – /env.py export disabled."
|
||||
$HAS_YQ || bashio::exit.nok "yq not found – script not executed."
|
||||
@@ -79,7 +82,8 @@ while IFS= read -r LINE; do
|
||||
VALUE="$(get_secret "$NAME")"
|
||||
[[ -z "$VALUE" ]] && bashio::exit.nok "Secret '$NAME' not found in $SECRETSFILE"
|
||||
fi
|
||||
VALUE="${VALUE##[[:space:]]}" ; VALUE="${VALUE%%[[:space:]]}"
|
||||
VALUE="${VALUE##[[:space:]]}"
|
||||
VALUE="${VALUE%%[[:space:]]}"
|
||||
SAFE_VALUE=$(shell_escape "$VALUE")
|
||||
export "$KEY=$VALUE"
|
||||
if $HAS_PYTHON; then
|
||||
|
||||
Reference in New Issue
Block a user