Merge pull request #19061 from Homebrew/fix_unset_variable

bin/brew: handle unbound variable.
This commit is contained in:
Mike McQuaid 2025-01-09 12:36:09 +00:00 committed by GitHub
commit 76019b4bca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -150,7 +150,7 @@ export_homebrew_env_file() {
do
[[ "${line}" = "${VAR}"* ]] && invalid_variable="${VAR}"
done
[[ -n "${invalid_variable}" ]] && continue
[[ -n "${invalid_variable:-}" ]] && continue
export "${line?}"
done <"${env_file}"