Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utils/gems: don't allow Sorbet to install on Sonoma's system Ruby #16003

Merged
merged 1 commit into from
Sep 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 @@

install_bundler!

require "settings"
valid_user_gem_groups = user_gem_groups & valid_gem_groups

Check warning on line 204 in Library/Homebrew/utils/gems.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/utils/gems.rb#L204

Added line #L204 was not covered by tests
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")

Check warning on line 208 in Library/Homebrew/utils/gems.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/utils/gems.rb#L208

Added line #L208 was not covered by tests
end

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

Check warning on line 212 in Library/Homebrew/utils/gems.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/utils/gems.rb#L212

Added line #L212 was not covered by tests
groups.sort!

ENV["BUNDLE_GEMFILE"] = gemfile
Expand Down