mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-16 01:18:19 +01:00
Update 01-config_yaml.sh
This commit is contained in:
@@ -74,7 +74,9 @@ dq_escape() {
|
||||
|
||||
while IFS= read -r LINE; do
|
||||
[[ -z "$LINE" || "$LINE" != *=* ]] && continue
|
||||
KEY="${LINE%%=*}"
|
||||
# Escape special characters not within single quotes
|
||||
LINE=$(sed -E "s/([^'])([][\$\`\"\\!&;|<>])/\1\\\\\\2/g" <<< "$LINE")
|
||||
KEY="${LINE%%=*}"
|
||||
VALUE="${LINE#*=}"
|
||||
# !secret handling
|
||||
if [[ "$VALUE" =~ ^!secret[[:space:]]+(.+) ]]; then
|
||||
|
||||
Reference in New Issue
Block a user