commit:     1947f0ed81f3b95a7e10a8a5a707776948f8a487
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Fri Feb 24 18:49:33 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jun  7 11:12:18 2023 +0000
URL:        
https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=1947f0ed

Have ebegin() strip the trailing LF of the message it is given, if any

This is a precautionary measure, given that ebegin() appends " ..." to
the message.

Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 functions.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/functions.sh b/functions.sh
index 97b0e6b..78317b3 100644
--- a/functions.sh
+++ b/functions.sh
@@ -179,8 +179,9 @@ ebegin()
        local msg
 
        if ! yesno "${EINFO_QUIET}"; then
-               msg="$* ...${genfun_newline}"
-               GENFUN_CALLER=ebegin _eprint "${GOOD}" "${msg}"
+               msg=$*
+               msg=${msg%"${genfun_newline}"}
+               _eprint "${GOOD}" "${msg} ...${genfun_newline}"
        fi
 }
 

Reply via email to