From 2c4808172d736cddfcb7b3c7d37e5f2217b05d37 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 09:10:32 +0000 Subject: [PATCH] GitHub bot: fix linting issues (nobuild) --- .templates/01-config_yaml.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.templates/01-config_yaml.sh b/.templates/01-config_yaml.sh index b7fe110aa..cf09aba56 100644 --- a/.templates/01-config_yaml.sh +++ b/.templates/01-config_yaml.sh @@ -145,20 +145,20 @@ while IFS= read -r line; do # Check if secret if [[ "$line" == *!secret* ]]; then - echo "Secret detected" - if [ ! -f "$SECRETSFILE" ]; then - bashio::log.fatal "Secrets file not found in $SECRETSFILE, $line skipped" - continue - fi - secret=$(echo "$line" | sed 's/.*!secret \(.*\)/\1/') - # Check if single match - secretnum=$(sed -n "/$secret:/=" "$SECRETSFILE") - if [[ $(echo "$secretnum" | grep -q ' ') ]]; then - bashio::exit.nok "There are multiple matches for your password name. Please check your secrets.yaml file" - fi - # Get text - secret_value=$(sed -n "/$secret:/s/.*: //p" "$SECRETSFILE") - line="${line%%=*}='$secret_value'" + echo "Secret detected" + if [ ! -f "$SECRETSFILE" ]; then + bashio::log.fatal "Secrets file not found in $SECRETSFILE, $line skipped" + continue + fi + secret=$(echo "$line" | sed 's/.*!secret \(.*\)/\1/') + # Check if single match + secretnum=$(sed -n "/$secret:/=" "$SECRETSFILE") + if [[ $(echo "$secretnum" | grep -q ' ') ]]; then + bashio::exit.nok "There are multiple matches for your password name. Please check your secrets.yaml file" + fi + # Get text + secret_value=$(sed -n "/$secret:/s/.*: //p" "$SECRETSFILE") + line="${line%%=*}='$secret_value'" fi # Data validation