utils: fix SVN remote test on Mojave.

For some reason Mojave needs the SSL args always set otherwise this
will always fail waiting for interactivity.

Also, while debugging this I noticed that `utils.rb` had a failure
expecting an integer so fix that too.
This commit is contained in:
Mike McQuaid 2019-01-22 14:20:24 +00:00
parent 80c2ed310c
commit 8bfde013f6
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70
2 changed files with 5 additions and 3 deletions

View File

@ -291,7 +291,7 @@ module Homebrew
$times = {}
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|
puts format("%-*s %0.4f sec", col_width, "#{method}:", time)
end

View File

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