Merge pull request #6558 from MikeMcQuaid/ruby-2.6-fixes
Ruby 2.6.3 fixes
This commit is contained in:
commit
aa043c1d67
@ -125,7 +125,7 @@ module Homebrew
|
|||||||
ronn.write markup
|
ronn.write markup
|
||||||
ronn.close_write
|
ronn.close_write
|
||||||
ronn_output = ronn.read
|
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"
|
if format_flag == "--markdown"
|
||||||
ronn_output = ronn_output.gsub(%r{<var>(.*?)</var>}, "*`\\1`*")
|
ronn_output = ronn_output.gsub(%r{<var>(.*?)</var>}, "*`\\1`*")
|
||||||
.gsub(/\n\n\n+/, "\n\n")
|
.gsub(/\n\n\n+/, "\n\n")
|
||||||
|
|||||||
@ -139,7 +139,11 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
def check_ruby_version
|
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 RUBY_VERSION == ruby_version
|
||||||
return if ARGV.homebrew_developer? && OS::Mac.prerelease?
|
return if ARGV.homebrew_developer? && OS::Mac.prerelease?
|
||||||
|
|
||||||
|
|||||||
@ -96,7 +96,7 @@ class SystemCommand
|
|||||||
|
|
||||||
return [] if set_variables.empty?
|
return [] if set_variables.empty?
|
||||||
|
|
||||||
["env", *set_variables]
|
["/usr/bin/env", *set_variables]
|
||||||
end
|
end
|
||||||
|
|
||||||
def sudo_prefix
|
def sudo_prefix
|
||||||
|
|||||||
@ -0,0 +1 @@
|
|||||||
|
testball_bottle-0.1.yosemite.bottle.tar.gz
|
||||||
@ -47,8 +47,7 @@ RSpec.shared_context "integration test" do
|
|||||||
|
|
||||||
example.run
|
example.run
|
||||||
ensure
|
ensure
|
||||||
FileUtils.rm HOMEBREW_PREFIX/"bin/brew"
|
FileUtils.rm_r HOMEBREW_PREFIX/"bin"
|
||||||
FileUtils.rmdir HOMEBREW_PREFIX/"bin"
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ describe SystemCommand do
|
|||||||
it "includes the given variables explicitly" do
|
it "includes the given variables explicitly" do
|
||||||
expect(Open3)
|
expect(Open3)
|
||||||
.to receive(:popen3)
|
.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
|
.and_call_original
|
||||||
|
|
||||||
command.run!
|
command.run!
|
||||||
@ -49,7 +49,7 @@ describe SystemCommand do
|
|||||||
expect(Open3)
|
expect(Open3)
|
||||||
.to receive(:popen3)
|
.to receive(:popen3)
|
||||||
.with(an_instance_of(Hash), ["/usr/bin/sudo", "/usr/bin/sudo"], "-E", "--",
|
.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|
|
.and_wrap_original do |original_popen3, *_, &block|
|
||||||
original_popen3.call("true", &block)
|
original_popen3.call("true", &block)
|
||||||
end
|
end
|
||||||
|
|||||||
@ -8,9 +8,8 @@ describe UnpackStrategy::Subversion, :needs_svn do
|
|||||||
let(:path) { working_copy }
|
let(:path) { working_copy }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
system "svnadmin", "create", repo
|
safe_system "xcrun", "svnadmin", "create", repo
|
||||||
|
safe_system "svn", "checkout", "file://#{repo}", working_copy
|
||||||
system "svn", "checkout", "file://#{repo}", working_copy
|
|
||||||
|
|
||||||
FileUtils.touch working_copy/"test"
|
FileUtils.touch working_copy/"test"
|
||||||
system "svn", "add", working_copy/"test"
|
system "svn", "add", working_copy/"test"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user