commit:     d03098998850d5f026a30f20eec54a4600518d9f
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Mon May 12 11:09:38 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May 12 11:09:38 2025 +0000
URL:        
https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=d0309899

Simplify the detection of posixlycorrect mode in yash

Yash supports test -o to this end.

Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>

 functions.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/functions.sh b/functions.sh
index ec0df2d..e4f5a7c 100644
--- a/functions.sh
+++ b/functions.sh
@@ -61,7 +61,7 @@ case ${KSH_VERSION} in 'Version AJM 93'*)
        return 1
 esac
 
-if [ "${YASH_VERSION}" ] && set +o | grep -qxF 'set -o posixlycorrect'; then
+if [ "${YASH_VERSION}" ] && [ -o posixlycorrect ]; then
        # The yash shell disables the local builtin in its POSIXly-correct mode.
        warn "gentoo-functions does not support yash in posixlycorrect mode"
        return 1

Reply via email to