os/mac/diagnostic: allow Ruby 2.6.8

This commit is contained in:
Bo Anderson 2021-10-21 02:31:32 +01:00
parent cd808983bc
commit 943b79d2fb
No known key found for this signature in database
GPG Key ID: 3DB94E204E137D65

View File

@ -201,12 +201,19 @@ module Homebrew
end end
def check_ruby_version def check_ruby_version
return if RUBY_VERSION == HOMEBREW_REQUIRED_RUBY_VERSION # TODO: require 2.6.8 for everyone once enough have updated to Monterey
required_version = if MacOS.version >= :monterey ||
ENV["HOMEBREW_RUBY_PATH"].to_s.include?("/vendor/portable-ruby/")
"2.6.8"
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.version}. Homebrew Ruby version #{RUBY_VERSION} is unsupported on #{MacOS.version}. Homebrew
is developed and tested on Ruby #{HOMEBREW_REQUIRED_RUBY_VERSION}, and may not work correctly is developed and tested on Ruby #{required_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