diff options
| author | Felix Fietkau | 2023-09-15 22:00:00 +0000 |
|---|---|---|
| committer | Petr Štetiar | 2025-11-13 10:45:59 +0000 |
| commit | 82cb5fd66af910c71deef67d49a5c9e3d319bde9 (patch) | |
| tree | 27514a7480d9d1dd2014692160bde4b86d871d87 | |
| parent | 17143f94dcbfef20d55afab783deb0e24cf67f15 (diff) | |
| download | libubox-82cb5fd66af910c71deef67d49a5c9e3d319bde9.tar.gz | |
libubox: Drop extraneous space when appending values to variable
Don't have a leading space when building out a variable via appends.
Fixes: #15
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [fix fixes trailer]
| -rw-r--r-- | sh/jshn.sh | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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() { |