Update 01-config_yaml.sh

This commit is contained in:
Alexandre
2025-07-05 17:52:06 +02:00
committed by GitHub
parent d91e5a12dc
commit 905f2dab4f

View File

@@ -55,8 +55,8 @@ shell_escape() { printf '%q' "$1"; }
# Prints key=value from YAML, ignoring comments/underscored keys
read_config() {
local file="$1"
yq eval 'to_entries | .[] | select(.key|test("^[#_]")|not) | "\(.key)=\"\(.value | @json)\""' "$file" 2>/dev/null
local file="$1"
yq eval 'to_entries | .[] | select(.key|test("^[#_]")|not) | "\(.key)=\(.value | @sh)"' "$file" 2>/dev/null
}
SECRETSFILE="/config/secrets.yaml"