base-files: functions.sh: prepend() always adds separator
It shouldn't gate on the value, since the value will ostensibly always be set; instead it should depend on the variable being prepended to being non-empty. Fixes #14403 Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
This commit is contained in:
parent
5798e12e4a
commit
95157dde04
|
@ -45,7 +45,7 @@ prepend() {
|
|||
local value="$2"
|
||||
local sep="${3:- }"
|
||||
|
||||
eval "export ${NO_EXPORT:+-n} -- \"$var=\${$value:+\${$value}\$sep}\$var\""
|
||||
eval "export ${NO_EXPORT:+-n} -- \"$var=\$value\${$var:+\${sep}\${$var}}\""
|
||||
}
|
||||
|
||||
list_contains() {
|
||||
|
|
Loading…
Reference in New Issue