mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Merge pull request #3156 from MikeMcQuaid/allow-developer-custom-ruby
os/mac/diagnostic: allow custom Ruby for devs.
This commit is contained in:
commit
c0063bb827
@ -197,6 +197,7 @@ module Homebrew
|
|||||||
def check_ruby_version
|
def check_ruby_version
|
||||||
ruby_version = "2.0"
|
ruby_version = "2.0"
|
||||||
return if RUBY_VERSION[/\d\.\d/] == ruby_version
|
return if RUBY_VERSION[/\d\.\d/] == ruby_version
|
||||||
|
return if ARGV.homebrew_developer? && OS::Mac.prerelease?
|
||||||
|
|
||||||
<<-EOS.undent
|
<<-EOS.undent
|
||||||
Ruby version #{RUBY_VERSION} is unsupported on #{MacOS.version}. Homebrew
|
Ruby version #{RUBY_VERSION} is unsupported on #{MacOS.version}. Homebrew
|
||||||
|
@ -47,15 +47,10 @@ describe Homebrew::Diagnostic::Checks do
|
|||||||
end
|
end
|
||||||
|
|
||||||
specify "#check_ruby_version" do
|
specify "#check_ruby_version" do
|
||||||
allow(MacOS).to receive(:version).and_return(OS::Mac::Version.new("10.13"))
|
allow(MacOS).to receive(:version).and_return(OS::Mac::Version.new("10.12"))
|
||||||
stub_const("RUBY_VERSION", "2.3.3p222")
|
stub_const("RUBY_VERSION", "1.8.6")
|
||||||
|
|
||||||
expect(subject.check_ruby_version)
|
expect(subject.check_ruby_version)
|
||||||
.to match <<-EOS.undent
|
.to match "Ruby version 1.8.6 is unsupported on 10.12"
|
||||||
Ruby version 2.3.3p222 is unsupported on 10.13. Homebrew
|
|
||||||
is developed and tested on Ruby 2.0, and may not work correctly
|
|
||||||
on other Rubies. Patches are accepted as long as they don't cause breakage
|
|
||||||
on supported Rubies.
|
|
||||||
EOS
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user