Skip to content

Commit

Permalink
Merge pull request #14043 from Bo98/allow-ruby-2.6.10
Browse files Browse the repository at this point in the history
os/mac/diagnostic: allow Ruby 2.6.10 on < Ventura
  • Loading branch information
Bo98 committed Oct 25, 2022
2 parents b9411ef + 476b5e7 commit 4c9eee3
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions Library/Homebrew/extend/os/mac/diagnostic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -205,19 +205,13 @@ def check_if_xcode_needs_clt_installed
end

def check_ruby_version
# TODO: update portable-ruby to 2.6.10 when Ventura reaches RC
required_version = if MacOS.version >= :ventura &&
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 RUBY_VERSION == HOMEBREW_REQUIRED_RUBY_VERSION
return if RUBY_VERSION == "2.6.10" # TODO: require 2.6.10
return if Homebrew::EnvConfig.developer? && OS::Mac.version.prerelease?

<<~EOS
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 supported Rubies.
EOS
Expand Down

0 comments on commit 4c9eee3

Please sign in to comment.