mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-23 06:20:31 +02:00
GitHub bot: fix linting issues (nobuild)
This commit is contained in:
@@ -139,7 +139,7 @@ function parse_yaml_to_vars {
|
||||
local output_file=$2
|
||||
|
||||
# Clear the output file if it already exists
|
||||
> "$output_file"
|
||||
>"$output_file"
|
||||
|
||||
# Process each line to escape special characters and format as needed
|
||||
while IFS= read -r line; do
|
||||
@@ -150,11 +150,11 @@ function parse_yaml_to_vars {
|
||||
line=${line/: /=}
|
||||
|
||||
# Escape special characters not within single quotes
|
||||
line=$(sed -E "s/([^'])([][\$\`\"\\!&;|<>])/\1\\\\\\2/g" <<< "$line")
|
||||
line=$(sed -E "s/([^'])([][\$\`\"\\!&;|<>])/\1\\\\\\2/g" <<<"$line")
|
||||
|
||||
# Write to output file
|
||||
echo "$line" >> "$output_file"
|
||||
done < "$input_file"
|
||||
echo "$line" >>"$output_file"
|
||||
done <"$input_file"
|
||||
}
|
||||
|
||||
# Get list of parameters in a file
|
||||
|
||||
Reference in New Issue
Block a user