Mike McQuaid 8bfde013f6
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.
2019-01-22 14:20:24 +00:00

21 lines
571 B
Ruby

module Utils
def self.clear_svn_version_cache
remove_instance_variable(:@svn) if instance_variable_defined?(:@svn)
end
def self.svn_available?
return @svn if instance_variable_defined?(:@svn)
@svn = quiet_system HOMEBREW_SHIMS_PATH/"scm/svn", "--version"
end
def self.svn_remote_exists?(url)
return true unless svn_available?
# 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