Merge pull request #20053 from Homebrew/skip_zero_values

bin/brew: don't copy across zeroed env values.
This commit is contained in:
Mike McQuaid 2025-06-05 07:43:17 +00:00 committed by GitHub
commit 485f1abbee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -183,8 +183,8 @@ MANPAGE_VARS=(
)
for VAR in "${MANPAGE_VARS[@]}"
do
# Skip if variable value is empty.
[[ -z "${!VAR:-}" ]] && continue
# Skip if variable value is empty or set to 0.
[[ -z "${!VAR:-}" || "${!VAR:-}" = "0" ]] && continue
VAR_NEW="HOMEBREW_${VAR}"
# Skip if existing HOMEBREW_* variable is set.