commit: 57ff8381139be8aeef4245406b45a99a3c724719
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Wed Aug 10 01:40:18 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri May 30 07:30:36 2025 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=57ff8381
isolated-functions.sh: don't incur subshell to assign to dots
That is, write printf -v dots … rather than dots=(printf …).
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>
bin/isolated-functions.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index 389c5e5af3..18ee80597d 100644
--- a/bin/isolated-functions.sh
+++ b/bin/isolated-functions.sh
@@ -345,7 +345,7 @@ eerror() {
ebegin() {
local msg="$*" dots spaces=${RC_DOT_PATTERN//?/ }
if [[ -n ${RC_DOT_PATTERN} ]] ; then
- dots=$(printf "%$(( COLS - 3 - ${#RC_INDENTATION} - ${#msg} - 7
))s" '')
+ printf -v dots "%$(( COLS - 3 - ${#RC_INDENTATION} - ${#msg} -
7 ))s" ''
dots=${dots//${spaces}/${RC_DOT_PATTERN}}
msg="${msg}${dots}"
else