From 9e7c5d30c24a9cdde657d0daba953b92b4d61f87 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 6 Jul 2025 14:26:32 +0000 Subject: [PATCH] GitHub bot: fix linting issues (nobuild) --- .templates/01-config_yaml.sh | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.templates/01-config_yaml.sh b/.templates/01-config_yaml.sh index 85ea26477..2720ab1a9 100644 --- a/.templates/01-config_yaml.sh +++ b/.templates/01-config_yaml.sh @@ -135,26 +135,26 @@ fi # Export all yaml entries as env variables # Helper function function parse_yaml_to_vars { - local input_file=$1 - local output_file=$2 + local input_file=$1 + local output_file=$2 - # Clear the output file if it already exists - > "$output_file" + # Clear the output file if it already exists + >"$output_file" - # Process each line to escape special characters and format as needed - while IFS= read -r line; do - # Skip lines that are empty or only contain whitespace - [[ -z "$line" ]] && continue + # Process each line to escape special characters and format as needed + while IFS= read -r line; do + # Skip lines that are empty or only contain whitespace + [[ -z "$line" ]] && continue - # Replace the first occurrence of ": " with "=" - line=${line/: /=} + # Replace the first occurrence of ": " with "=" + line=${line/: /=} - # Escape special characters not within single quotes - line=$(sed -E "s/([^'])([][\$\`\"\\!&;|<>])/\1\\\\\\2/g" <<< "$line") + # Escape special characters not within single quotes + line=$(sed -E "s/([^'])([][\$\`\"\\!&;|<>])/\1\\\\\\2/g" <<<"$line") - # Write to output file - echo "$line" >> "$output_file" - done < "$input_file" + # Write to output file + echo "$line" >>"$output_file" + done <"$input_file" } # Get list of parameters in a file