commit:     6527b22f28c5cf5618b04e836bf943efd58e83d9
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Sat Jul 27 00:29:32 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri May 30 07:35:55 2025 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=6527b22f

save-ebuild-env.sh: eliminate a redundant compound command

A bash function must always define a compound command. Up until now,
__save_ebuild_env() had defined a command of the { ...; } form, only to
employ the ( ... ) form within. Instead, define the function so as to
employ the latter form.

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

 bin/save-ebuild-env.sh | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/bin/save-ebuild-env.sh b/bin/save-ebuild-env.sh
index 98f03bd000..418006da20 100644
--- a/bin/save-ebuild-env.sh
+++ b/bin/save-ebuild-env.sh
@@ -10,8 +10,7 @@
 # be excluded from the output. These function are not needed for installation
 # or removal of the packages, and can therefore be safely excluded.
 #
-__save_ebuild_env() {
-       (
+__save_ebuild_env() (
        if has --exclude-init-phases $* ; then
                unset S __E_DESTTREE __E_INSDESTTREE __E_DOCDESTTREE 
__E_EXEDESTTREE \
                        PORTAGE_DOCOMPRESS_SIZE_LIMIT PORTAGE_DOCOMPRESS \
@@ -134,5 +133,4 @@ __save_ebuild_env() {
        if [[ ${BASH_VERSINFO[0]} == 3 ]]; then
                export
        fi
-       )
-}
+)

Reply via email to