GitHub bot: fix linting issues (nobuild)

This commit is contained in:
github-actions
2025-07-08 07:51:56 +00:00
parent 25e3b2f35d
commit 881331420c

View File

@@ -29,11 +29,11 @@ mapfile -t arr < <(jq -r 'keys[]' "${JSONSOURCE}")
# Escape special characters using printf and enclose in double quotes # Escape special characters using printf and enclose in double quotes
sanitize_variable() { sanitize_variable() {
local input="$1" local input="$1"
local escaped_input local escaped_input
printf -v escaped_input '%q' "$input" printf -v escaped_input '%q' "$input"
escaped_input=\"${escaped_input//\'/\'\'}\" escaped_input=\"${escaped_input//\'/\'\'}\"
echo "$escaped_input" echo "$escaped_input"
} }
for KEYS in "${arr[@]}"; do for KEYS in "${arr[@]}"; do
@@ -43,10 +43,10 @@ for KEYS in "${arr[@]}"; do
if [[ "$VALUE" == \[* ]]; then if [[ "$VALUE" == \[* ]]; then
bashio::log.warning "One of your option is an array, skipping" bashio::log.warning "One of your option is an array, skipping"
else else
# Sanitize variable # Sanitize variable
if [[ "$VALUE" != \'*\' ]]; then if [[ "$VALUE" != \'*\' ]]; then
VALUE=$(sanitize_variable "$VALUE") VALUE=$(sanitize_variable "$VALUE")
fi fi
# Continue for single values # Continue for single values
line="${KEYS}=${VALUE}" line="${KEYS}=${VALUE}"
# Check if secret # Check if secret