aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2017-11-04 16:34:26 +0000
committerMike McQuaid2017-11-05 14:45:36 +0000
commit1b698481195eea4e462d8a9702d60f4592ade725 (patch)
tree628958d6a48c0f485f01e9c006e7aabc80ee0356
parentb369593cbdecd9e065adc9b553cc4d7530c90c0c (diff)
downloadbrew-1b698481195eea4e462d8a9702d60f4592ade725.tar.bz2
system_config: output curl path and version.
-rw-r--r--Library/Homebrew/system_config.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/Library/Homebrew/system_config.rb b/Library/Homebrew/system_config.rb
index 063f7f34f..df88d7e7e 100644
--- a/Library/Homebrew/system_config.rb
+++ b/Library/Homebrew/system_config.rb
@@ -148,6 +148,15 @@ class SystemConfig
"#{Utils.git_version} => #{Utils.git_path}"
end
+ def describe_curl
+ curl_version_output = Utils.popen_read("#{curl_executable} --version", err: :close)
+ curl_version_output =~ /^curl ([\d\.]+)/
+ curl_version = Regexp.last_match(1)
+ "#{curl_version} => #{curl_executable}"
+ rescue
+ "N/A"
+ end
+
def dump_verbose_config(f = $stdout)
f.puts "HOMEBREW_VERSION: #{HOMEBREW_VERSION}"
f.puts "ORIGIN: #{origin}"
@@ -170,6 +179,7 @@ class SystemConfig
f.puts "GCC-4.2: build #{gcc_4_2}" unless gcc_4_2.null?
f.puts "Clang: #{clang.null? ? "N/A" : "#{clang} build #{clang_build}"}"
f.puts "Git: #{describe_git}"
+ f.puts "Curl: #{describe_curl}"
f.puts "Perl: #{describe_perl}"
f.puts "Python: #{describe_python}"
f.puts "Ruby: #{describe_ruby}"