mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-02 05:44:03 +02:00
Update 01-config_yaml.sh
This commit is contained in:
@@ -74,7 +74,9 @@ dq_escape() {
|
|||||||
|
|
||||||
while IFS= read -r LINE; do
|
while IFS= read -r LINE; do
|
||||||
[[ -z "$LINE" || "$LINE" != *=* ]] && continue
|
[[ -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#*=}"
|
VALUE="${LINE#*=}"
|
||||||
# !secret handling
|
# !secret handling
|
||||||
if [[ "$VALUE" =~ ^!secret[[:space:]]+(.+) ]]; then
|
if [[ "$VALUE" =~ ^!secret[[:space:]]+(.+) ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user