[PATCH 1/1] jshn.sh: Drop extraneous space when appending values to variable
Philip Prindeville
philipp at redfish-solutions.com
Sun May 4 14:43:18 PDT 2025
From: Philip Prindeville <philipp at redfish-solutions.com>
fixes: issue #15
Signed-off-by: Felix Fietkau <nbd at nbd.name>
Signed-off-by: Philip Prindeville <philipp at redfish-solutions.com>
---
sh/jshn.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sh/jshn.sh b/sh/jshn.sh
index 1d3055711820e5a21ea59cae49e7bf3f56b626d8..66ca9524a041ebd71cbad044d9a9fc595393296b 100644
--- a/sh/jshn.sh
+++ b/sh/jshn.sh
@@ -23,7 +23,7 @@ __jshn_raw_append() {
_jshn_append() {
# var=$1
local _a_value="$2"
- eval "${JSON_PREFIX}$1=\"\${${JSON_PREFIX}$1} \$_a_value\""
+ eval "${JSON_PREFIX}$1=\"\${${JSON_PREFIX}$1}\${${JSON_PREFIX}$1:+ }\$_a_value\""
}
_get_var() {
--
2.43.0
More information about the openwrt-devel
mailing list