diff --git a/logging.sh b/logging.sh index dc16988..dd97c29 100644 --- a/logging.sh +++ b/logging.sh @@ -53,7 +53,7 @@ # Version (updated by release workflow) # Guard against re-initialization when sourced multiple times # Use readonly status instead of emptiness to avoid environment bypass -if ! readonly -p 2>/dev/null | grep -q "declare -[^ ]*r[^ ]* BASH_LOGGER_VERSION="; then +if ! readonly -p 2>/dev/null | grep -qE '(declare|typeset) -[^ ]*r[^ ]* BASH_LOGGER_VERSION='; then readonly BASH_LOGGER_VERSION="2.5.1" # Unset potentially malicious environment variables before setting internal constants