fixed displayed value

This commit is contained in:
fatalerrors
2026-07-08 18:56:50 +02:00
parent 970cd2ccf6
commit 2702682fae

View File

@@ -285,8 +285,9 @@ conf_dump()
# Commented-out key=value — shown only with show_all. # Commented-out key=value — shown only with show_all.
# The value displayed is the live environment value (what load_conf # The value displayed is the live environment value (what load_conf
# actually exported), not the commented-out text which may be an # actually exported); when the key is not set in the environment we
# example or stale documentation. Each key is shown at most once. # fall back to the value written in the comment, i.e. the documented
# default. Each key is shown at most once.
if (show_all && $0 ~ /^[[:space:]]*#[[:space:]]*[A-Za-z_][A-Za-z0-9_]*[[:space:]]*=/) { if (show_all && $0 ~ /^[[:space:]]*#[[:space:]]*[A-Za-z_][A-Za-z0-9_]*[[:space:]]*=/) {
line = $0; sub(/^[[:space:]]*#[[:space:]]*/, "", line) line = $0; sub(/^[[:space:]]*#[[:space:]]*/, "", line)
key = line; sub(/[[:space:]]*=.*$/, "", key); sub(/^[[:space:]]*/, "", key) key = line; sub(/[[:space:]]*=.*$/, "", key); sub(/^[[:space:]]*/, "", key)
@@ -294,6 +295,7 @@ conf_dump()
seen[current_sec ":" key] = 1 seen[current_sec ":" key] = 1
if (key_filter != "" && index(key, key_filter) == 0) next if (key_filter != "" && index(key, key_filter) == 0) next
val = ENVIRON[key] val = ENVIRON[key]
if (val == "") { val = line; sub(/^[^=]*=[[:space:]]*/, "", val) }
if (!hdr_printed) { if (!hdr_printed) {
if (found) print "" if (found) print ""
print c_sec "[" current_sec "]" c_rst print c_sec "[" current_sec "]" c_rst