Merge pull request #14043 from Bo98/allow-ruby-2.6.10

os/mac/diagnostic: allow Ruby 2.6.10 on < Ventura
This commit is contained in:
Bo Anderson 2022-10-25 12:02:52 +01:00 committed by GitHub
commit 4c9eee3bf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -205,19 +205,13 @@ module Homebrew
end end
def check_ruby_version def check_ruby_version
# TODO: update portable-ruby to 2.6.10 when Ventura reaches RC return if RUBY_VERSION == HOMEBREW_REQUIRED_RUBY_VERSION
required_version = if MacOS.version >= :ventura && return if RUBY_VERSION == "2.6.10" # TODO: require 2.6.10
ENV["HOMEBREW_RUBY_PATH"].to_s.exclude?("/vendor/portable-ruby/")
"2.6.10"
else
HOMEBREW_REQUIRED_RUBY_VERSION
end
return if RUBY_VERSION == required_version
return if Homebrew::EnvConfig.developer? && OS::Mac.version.prerelease? return if Homebrew::EnvConfig.developer? && OS::Mac.version.prerelease?
<<~EOS <<~EOS
Ruby version #{RUBY_VERSION} is unsupported on macOS #{MacOS.version}. Homebrew Ruby version #{RUBY_VERSION} is unsupported on macOS #{MacOS.version}. Homebrew
is developed and tested on Ruby #{required_version}, and may not work correctly is developed and tested on Ruby #{HOMEBREW_REQUIRED_RUBY_VERSION}, and may not work correctly
on other Rubies. Patches are accepted as long as they don't cause breakage on other Rubies. Patches are accepted as long as they don't cause breakage
on supported Rubies. on supported Rubies.
EOS EOS