From 881331420c5f6e15195a9b69aa7e4d6bb0e17007 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 07:51:56 +0000 Subject: [PATCH] GitHub bot: fix linting issues (nobuild) --- .templates/00-global_var.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.templates/00-global_var.sh b/.templates/00-global_var.sh index 93e6dcd99..dcfd16931 100644 --- a/.templates/00-global_var.sh +++ b/.templates/00-global_var.sh @@ -29,11 +29,11 @@ mapfile -t arr < <(jq -r 'keys[]' "${JSONSOURCE}") # Escape special characters using printf and enclose in double quotes sanitize_variable() { - local input="$1" - local escaped_input - printf -v escaped_input '%q' "$input" - escaped_input=\"${escaped_input//\'/\'\'}\" - echo "$escaped_input" + local input="$1" + local escaped_input + printf -v escaped_input '%q' "$input" + escaped_input=\"${escaped_input//\'/\'\'}\" + echo "$escaped_input" } for KEYS in "${arr[@]}"; do @@ -43,10 +43,10 @@ for KEYS in "${arr[@]}"; do if [[ "$VALUE" == \[* ]]; then bashio::log.warning "One of your option is an array, skipping" else - # Sanitize variable - if [[ "$VALUE" != \'*\' ]]; then - VALUE=$(sanitize_variable "$VALUE") - fi + # Sanitize variable + if [[ "$VALUE" != \'*\' ]]; then + VALUE=$(sanitize_variable "$VALUE") + fi # Continue for single values line="${KEYS}=${VALUE}" # Check if secret