commit: aa9c50dd87a43ee6a903d3c7219e2b3c0a647052
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Mon May 12 12:14:23 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May 12 12:14:23 2025 +0000
URL:
https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=aa9c50dd
Don't complain about $- for incompatible shells
Should the shell be incompatible with gentoo-functions, just say so and
return 1 as soon as possible.
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
functions.sh | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/functions.sh b/functions.sh
index 72e3588..2af4a24 100644
--- a/functions.sh
+++ b/functions.sh
@@ -45,11 +45,6 @@ warn()
printf '%s: %s\n' "${0##*/}" "$*" >&2
}
-case $- in *[eu]*)
- # https://lists.gnu.org/archive/html/help-bash/2020-04/msg00049.html
- warn "gentoo-functions supports neither the errexit option nor the
nounset option; unexpected behaviour may ensue"
-esac
-
case ${KSH_VERSION} in 'Version AJM 93'*)
# The ksh93 shell has a typeset builtin but no local builtin.
warn "gentoo-functions does not currently support ksh93"
@@ -62,6 +57,11 @@ if [ "${YASH_VERSION}" ] && [ -o posixlycorrect ]; then
return 1
fi
+case $- in *[eu]*)
+ # https://lists.gnu.org/archive/html/help-bash/2020-04/msg00049.html
+ warn "gentoo-functions supports neither the errexit option nor the
nounset option; unexpected behaviour may ensue"
+esac
+
#
# Considers the first parameter as a reference to a variable by name and
# assigns the second parameter as its value. If the first parameter is found