[PATCH 2/2] scripts/config: print string values literally with --state
From: Daniel Syauqi
Date: Mon Nov 30 2026 - 02:53:10 EST
With CONFIG_LOCALVERSION="-n", querying --state LOCALVERSION exits
successfully without printing any bytes. Bash's echo interprets the
decoded string as an option. Values such as "-e" yield only a newline.
Use printf with a fixed format so that each query produces the value
followed by a newline, including when multiple queries are chained.
Fixes: d6686da814c8 ("scripts/config: properly report and set string options")
Signed-off-by: Daniel Syauqi <syauqicode@xxxxxxxxx>
---
scripts/config | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/config b/scripts/config
index ba66b681d..143dae061 100755
--- a/scripts/config
+++ b/scripts/config
@@ -214,7 +214,7 @@ while [ "$1" != "" ] ; do
V="${V/%\"/}"
V="${V//\\\"/\"}"
V="${V//\\\\/\\}"
- echo "${V}"
+ printf '%s\n' "$V"
fi
fi
;;