From 115aaedfa34d23206349b8d2d708b0505bf6a9c2 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 15 Sep 2023 16:00:00 -0600 Subject: [PATCH] jshn.sh: Drop extraneous space when appending values to variable fixes: issue #15 Signed-off-by: Felix Fietkau Signed-off-by: Philip Prindeville --- sh/jshn.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/jshn.sh b/sh/jshn.sh index 1d30557..66ca952 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() {