Merge pull request #6558 from MikeMcQuaid/ruby-2.6-fixes

Ruby 2.6.3 fixes
This commit is contained in:
Mike McQuaid 2019-10-08 19:35:41 +01:00 committed by GitHub
commit aa043c1d67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 13 additions and 10 deletions

View File

@ -125,7 +125,7 @@ module Homebrew
ronn.write markup
ronn.close_write
ronn_output = ronn.read
odie "Got no output from ronn!" unless ronn_output
odie "Got no output from ronn!" if ronn_output.blank?
if format_flag == "--markdown"
ronn_output = ronn_output.gsub(%r{<var>(.*?)</var>}, "*`\\1`*")
.gsub(/\n\n\n+/, "\n\n")

View File

@ -139,7 +139,11 @@ module Homebrew
end
def check_ruby_version
ruby_version = "2.3.7"
ruby_version = if MacOS.version >= :catalina
"2.6.3"
else
"2.3.7"
end
return if RUBY_VERSION == ruby_version
return if ARGV.homebrew_developer? && OS::Mac.prerelease?

View File

@ -96,7 +96,7 @@ class SystemCommand
return [] if set_variables.empty?
["env", *set_variables]
["/usr/bin/env", *set_variables]
end
def sudo_prefix

View File

@ -0,0 +1 @@
testball_bottle-0.1.yosemite.bottle.tar.gz

View File

@ -47,8 +47,7 @@ RSpec.shared_context "integration test" do
example.run
ensure
FileUtils.rm HOMEBREW_PREFIX/"bin/brew"
FileUtils.rmdir HOMEBREW_PREFIX/"bin"
FileUtils.rm_r HOMEBREW_PREFIX/"bin"
end
end

View File

@ -23,7 +23,7 @@ describe SystemCommand do
it "includes the given variables explicitly" do
expect(Open3)
.to receive(:popen3)
.with(an_instance_of(Hash), ["env", "env"], "A=1", "B=2", "C=3", "env", *env_args, {})
.with(an_instance_of(Hash), ["/usr/bin/env", "/usr/bin/env"], "A=1", "B=2", "C=3", "env", *env_args, {})
.and_call_original
command.run!
@ -49,7 +49,7 @@ describe SystemCommand do
expect(Open3)
.to receive(:popen3)
.with(an_instance_of(Hash), ["/usr/bin/sudo", "/usr/bin/sudo"], "-E", "--",
"env", "A=1", "B=2", "C=3", "env", *env_args, {})
"/usr/bin/env", "A=1", "B=2", "C=3", "env", *env_args, {})
.and_wrap_original do |original_popen3, *_, &block|
original_popen3.call("true", &block)
end

View File

@ -8,9 +8,8 @@ describe UnpackStrategy::Subversion, :needs_svn do
let(:path) { working_copy }
before do
system "svnadmin", "create", repo
system "svn", "checkout", "file://#{repo}", working_copy
safe_system "xcrun", "svnadmin", "create", repo
safe_system "svn", "checkout", "file://#{repo}", working_copy
FileUtils.touch working_copy/"test"
system "svn", "add", working_copy/"test"