From 97db68d40831c36dea704ba4f82e18542a05dbd9 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 21 Aug 2024 09:46:49 +0100 Subject: [PATCH] Revert "bin/brew: tighten check in `export_homebrew_env_file`" --- bin/brew | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/brew b/bin/brew index 329f642c8c..972bfa3eda 100755 --- a/bin/brew +++ b/bin/brew @@ -108,14 +108,14 @@ HOMEBREW_LIBRARY="${HOMEBREW_REPOSITORY}/Library" # Load Homebrew's variable configuration files from disk. export_homebrew_env_file() { - local env_file="${1}" - local homebrew_env_regex="^HOMEBREW_[A-Z_]+=[^=]*$" + local env_file + env_file="${1}" [[ -r "${env_file}" ]] || return 0 while read -r line do # only load HOMEBREW_* lines - [[ "${line}" =~ ${homebrew_env_regex} ]] || continue + [[ "${line}" = "HOMEBREW_"* ]] || continue export "${line?}" done <"${env_file}" }