commit: 2700a297abd2b565ad7d017792f87d92f70a44e2
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Sat Jun 7 15:41:01 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jun 7 22:54:06 2025 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=2700a297
bashrc-functions.sh: use continue in register_{die,success}_hook()
Where the register_die_hook() and register_success_hook() functions
encounter an invalid parameter, have them skip over the parameter with
the continue builtin, as opposed to the true (:) builtin. That way, the
code better expresses its intent.
See-also: bf17d5963cead8c930d3e996f976e57b99d839f8
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>
bin/bashrc-functions.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/bashrc-functions.sh b/bin/bashrc-functions.sh
index 568f16da6c..32611ebaa8 100644
--- a/bin/bashrc-functions.sh
+++ b/bin/bashrc-functions.sh
@@ -7,7 +7,7 @@ register_die_hook() {
for hook; do
if [[ ${hook} != +([![:space:]]) ]]; then
- :
+ continue
elif ! contains_word "${hook}" "${EBUILD_DEATH_HOOKS}"; then
export EBUILD_DEATH_HOOKS+=" ${hook}"
fi
@@ -19,7 +19,7 @@ register_success_hook() {
for hook; do
if [[ ${hook} != +([![:space:]]) ]]; then
- :
+ continue
elif ! contains_word "${hook}" "${EBUILD_SUCCESS_HOOKS}"; then
export EBUILD_SUCCESS_HOOKS+=" ${hook}"
fi