Add condition to check if ruby version is < 2.7#6977
Add condition to check if ruby version is < 2.7#6977MikeMcQuaid merged 4 commits intoHomebrew:masterfrom
Conversation
| if [[ -z "$HOMEBREW_RUBY_PATH" || -n "$HOMEBREW_FORCE_VENDOR_RUBY" || "$ruby_version_new_enough" != "true" ]] | ||
| if [[ -n "$HOMEBREW_RUBY_PATH" && -z "$HOMEBREW_FORCE_VENDOR_RUBY" ]] | ||
| then | ||
| ruby_version_old_enough="$("$HOMEBREW_RUBY_PATH" --enable-frozen-string-literal --disable=gems,did_you_mean,rubyopt -rrubygems -e "puts Gem::Version.new(RUBY_VERSION.to_s.dup) < Gem::Version.new('$maximum_ruby_version')")" |
There was a problem hiding this comment.
I'm inclined to merge lines 46 and 51 into a single test: acceptable_ruby_version=…
MikeMcQuaid
left a comment
There was a problem hiding this comment.
Great work so far! Not tested these changes locally but they should help get in the right direction!
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
emreerhan
left a comment
There was a problem hiding this comment.
I committed all of the suggested changes.
|
Quick question, the MacOS CircleCI test failed because: It seems like this isn't an issue on my end, is it? |
|
Scratch my last comment. Seems like all checks have passed. When I have time later this weekend I'm going to try cloning this branch on a Docker instance w/ Ruby 2.7 installed to see if it works! |
|
Thanks so much for your contribution! Without people like you submitting PRs we couldn't run this project. You rock, @emreerhan! |
|
Thank you for your first contribution to Homebrew/brew, Emre! 🥇 |
brew stylewith your changes locally?brew testswith your changes locally?Fixes #6952