commit:     efdf0a4d0a889eb1549163b32a3a1c68521e4c42
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Sat Feb 18 05:53:23 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Feb 19 16:14:05 2023 +0000
URL:        
https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=efdf0a4d

Declare RC_GOT_FUNCTIONS after having declared all functions, not before

There is no sense in claiming that the functions have been gotten until
such time as the shell has successfully evaluated their declarations.

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

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

diff --git a/functions.sh b/functions.sh
index 01f2972..2918558 100644
--- a/functions.sh
+++ b/functions.sh
@@ -2,9 +2,6 @@
 # Distributed under the terms of the GNU General Public License v2
 # shellcheck shell=sh disable=3043
 
-# shellcheck disable=2034
-RC_GOT_FUNCTIONS="yes"
-
 #
 #    This is a private function, called by ebegin, eerrorn, einfon, and ewarnn.
 #
@@ -473,6 +470,8 @@ _is_visible() {
 }
 
 # This is the main script, please add all functions above this point!
+# shellcheck disable=2034
+RC_GOT_FUNCTIONS="yes"
 
 # Dont output to stdout?
 EINFO_QUIET="${EINFO_QUIET:-no}"

Reply via email to