Skip to content

Commit

Permalink
Merge pull request #16003 from Bo98/sorbet-sonoma
Browse files Browse the repository at this point in the history
utils/gems: don't allow Sorbet to install on Sonoma's system Ruby
  • Loading branch information
MikeMcQuaid committed Sep 14, 2023
2 parents ade6ce1 + dd17799 commit 1a481be
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Library/Homebrew/utils/gems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,15 @@ def install_bundler_gems!(only_warn_on_failure: false, setup_path: true, groups:

install_bundler!

require "settings"
valid_user_gem_groups = user_gem_groups & valid_gem_groups
if RUBY_PLATFORM.end_with?("-darwin23")
raise "Sorbet is not currently supported under system Ruby on macOS Sonoma." if groups.include?("sorbet")

valid_user_gem_groups.delete("sorbet")
end

# Combine the passed groups with the ones stored in settings
groups |= (user_gem_groups & valid_gem_groups)
groups |= valid_user_gem_groups
groups.sort!

ENV["BUNDLE_GEMFILE"] = gemfile
Expand Down

0 comments on commit 1a481be

Please sign in to comment.