commit: 9b955a2693fe679b03005128867525f4b8363a22
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Fri Feb 17 04:45:13 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb 17 07:38:33 2023 +0000
URL:
https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=9b955a26
Only join the positional parameters where necessary in _eend()
Also, don't join them twice.
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>
functions.sh | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/functions.sh b/functions.sh
index 816acf4..01f2972 100644
--- a/functions.sh
+++ b/functions.sh
@@ -237,8 +237,11 @@ _eend()
if [ "${retval}" -ne 0 ]; then
# If a message was given, print it with the specified function.
- if _is_visible "$*"; then
- "${efunc}" "$*"
+ if [ "$#" -gt 0 ]; then
+ msg=$*
+ if _is_visible "${msg}"; then
+ "${efunc}" "${msg}"
+ fi
fi
# Generate an indicator for ebegin's unsuccessful conclusion.
if [ "${is_tty}" -eq 0 ]; then