فهرست منبع

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 <[email protected]>
Philip Prindeville 1 سال پیش
والد
کامیت
95157dde04
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      package/base-files/files/lib/functions.sh

+ 1 - 1
package/base-files/files/lib/functions.sh

@@ -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() {