Merge pull request #5584 from MikeMcQuaid/svn-remote-mojave

utils: fix SVN remote test on Mojave.
This commit is contained in:
Mike McQuaid 2019-01-22 18:35:07 +00:00 committed by GitHub
commit 550202d005
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -291,7 +291,7 @@ module Homebrew
$times = {} $times = {}
at_exit do at_exit do
col_width = [$times.keys.map(&:size).max + 2, 15].max col_width = [$times.keys.map(&:size).max.to_i + 2, 15].max
$times.sort_by { |_k, v| v }.each do |method, time| $times.sort_by { |_k, v| v }.each do |method, time|
puts format("%-*s %0.4f sec", col_width, "#{method}:", time) puts format("%-*s %0.4f sec", col_width, "#{method}:", time)
end end

View File

@ -12,7 +12,9 @@ module Utils
def self.svn_remote_exists?(url) def self.svn_remote_exists?(url)
return true unless svn_available? return true unless svn_available?
ssl_args = ["--non-interactive", "--trust-server-cert"] if ENV["HOMEBREW_TEST_ONLINE"] # OK to unconditionally trust here because we're just checking if
quiet_system "svn", "ls", url, "--depth", "empty", *ssl_args # a URL exists.
quiet_system "svn", "ls", url, "--depth", "empty",
"--non-interactive", "--trust-server-cert"
end end
end end