diff --git a/Library/Homebrew/dev-cmd/man.rb b/Library/Homebrew/dev-cmd/man.rb index 8d55043393..147a34ef9a 100644 --- a/Library/Homebrew/dev-cmd/man.rb +++ b/Library/Homebrew/dev-cmd/man.rb @@ -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{(.*?)}, "*`\\1`*") .gsub(/\n\n\n+/, "\n\n") diff --git a/Library/Homebrew/extend/os/mac/diagnostic.rb b/Library/Homebrew/extend/os/mac/diagnostic.rb index 5d5e2eec9b..3116255fa2 100644 --- a/Library/Homebrew/extend/os/mac/diagnostic.rb +++ b/Library/Homebrew/extend/os/mac/diagnostic.rb @@ -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? diff --git a/Library/Homebrew/system_command.rb b/Library/Homebrew/system_command.rb index ec99b832bd..e524359a10 100644 --- a/Library/Homebrew/system_command.rb +++ b/Library/Homebrew/system_command.rb @@ -96,7 +96,7 @@ class SystemCommand return [] if set_variables.empty? - ["env", *set_variables] + ["/usr/bin/env", *set_variables] end def sudo_prefix diff --git a/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.catalina.bottle.tar.gz b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.catalina.bottle.tar.gz new file mode 120000 index 0000000000..3e989830ba --- /dev/null +++ b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.catalina.bottle.tar.gz @@ -0,0 +1 @@ +testball_bottle-0.1.yosemite.bottle.tar.gz \ No newline at end of file diff --git a/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb b/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb index 6ce53e97f4..b61a0b0c14 100644 --- a/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb +++ b/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb @@ -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 diff --git a/Library/Homebrew/test/system_command_spec.rb b/Library/Homebrew/test/system_command_spec.rb index 63675661a8..a10b4f485a 100644 --- a/Library/Homebrew/test/system_command_spec.rb +++ b/Library/Homebrew/test/system_command_spec.rb @@ -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 diff --git a/Library/Homebrew/test/unpack_strategy/subversion_spec.rb b/Library/Homebrew/test/unpack_strategy/subversion_spec.rb index dc818221b4..74c4c80ad4 100644 --- a/Library/Homebrew/test/unpack_strategy/subversion_spec.rb +++ b/Library/Homebrew/test/unpack_strategy/subversion_spec.rb @@ -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"