Merge pull request #16246 from Bo98/ruby3-earlier

brew.sh: set HOMEBREW_RUBY3 earlier
This commit is contained in:
Bo Anderson 2023-11-22 01:14:21 +00:00 committed by GitHub
commit 50864cf8ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -502,6 +502,11 @@ case "$*" in
;;
esac
if [[ -n "${HOMEBREW_DEVELOPER}" ]]
then
export HOMEBREW_RUBY3="1"
fi
# TODO: bump version when new macOS is released or announced and update references in:
# - docs/Installation.md
# - https://github.com/Homebrew/install/blob/HEAD/install.sh
@ -945,11 +950,6 @@ then
export HOMEBREW_SORBET_RUNTIME="1"
fi
if [[ -n "${HOMEBREW_DEVELOPER}" ]]
then
export HOMEBREW_RUBY3="1"
fi
if [[ -f "${HOMEBREW_LIBRARY}/Homebrew/cmd/${HOMEBREW_COMMAND}.sh" ]]
then
HOMEBREW_BASH_COMMAND="${HOMEBREW_LIBRARY}/Homebrew/cmd/${HOMEBREW_COMMAND}.sh"

View File

@ -35,6 +35,7 @@ describe Homebrew::Diagnostic::Checks do
allow(OS::Mac).to receive(:version).and_return(macos_version)
allow(OS::Mac).to receive(:full_version).and_return(macos_version)
stub_const("RUBY_VERSION", "1.8.6")
ENV["HOMEBREW_MACOS_SYSTEM_RUBY_NEW_ENOUGH"] = "1"
expect(checks.check_ruby_version)
.to match "Ruby version 1.8.6 is unsupported on macOS 10.12"