Skip to content

Commit

Permalink
Merge pull request #16277 from Bo98/ruby3-env-unset
Browse files Browse the repository at this point in the history
Unset HOMEBREW_RUBY3 after updates
  • Loading branch information
MikeMcQuaid committed Dec 1, 2023
2 parents d68e3e5 + e19c3e1 commit 1130070
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Library/Homebrew/brew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@ auto-update() {
# Restore user path as it'll be refiltered by HOMEBREW_BREW_FILE (bin/brew)
export PATH=${HOMEBREW_PATH}

unset HOMEBREW_RUBY3

# exec a new process to set any new environment variables.
exec "${HOMEBREW_BREW_FILE}" "$@"
fi
Expand Down
5 changes: 4 additions & 1 deletion Library/Homebrew/cmd/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,10 @@ EOS
[[ ! -f "${HOMEBREW_CACHE}/all_commands_list.txt" ]] ||
[[ -n "${HOMEBREW_DEVELOPER}" && -z "${HOMEBREW_UPDATE_AUTO}" ]]
then
brew update-report "$@"
(
unset HOMEBREW_RUBY3
brew update-report "$@"
)
return $?
elif [[ -z "${HOMEBREW_UPDATE_AUTO}" && -z "${HOMEBREW_QUIET}" ]]
then
Expand Down

0 comments on commit 1130070

Please sign in to comment.