Skip to content

Commit

Permalink
jshn.sh: Drop extraneous space when appending values to variable
Browse files Browse the repository at this point in the history
fixes: issue #15

Signed-off-by: Felix Fietkau <[email protected]>
Signed-off-by: Philip Prindeville <[email protected]>
  • Loading branch information
nbd168 authored and pprindeville committed Aug 4, 2024
1 parent eb9bcb6 commit 115aaed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sh/jshn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 115aaed

Please sign in to comment.