aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorBaptiste Fontaine2015-01-06 10:54:55 +0100
committerMike McQuaid2015-01-22 17:16:36 +0100
commitaec2f01a55b9cd167e72e23b5ef18a8584411dd2 (patch)
tree798b0557a5030a96960bdc72ac59419db39748c4 /Library/Homebrew
parent011b47aeff60fa152496a5533110e4690970dba1 (diff)
downloadbrew-aec2f01a55b9cd167e72e23b5ef18a8584411dd2.tar.bz2
config: add Java to output.
Closes Homebrew/homebrew#35596. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cmd/config.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/config.rb b/Library/Homebrew/cmd/config.rb
index 4caa3afec..69914dec0 100644
--- a/Library/Homebrew/cmd/config.rb
+++ b/Library/Homebrew/cmd/config.rb
@@ -119,6 +119,11 @@ module Homebrew
s
end
+ def java_version
+ java = `java -version 2>&1`.lines.first.chomp
+ java =~ /java version "(.+?)"/ ? $1 : java
+ end
+
def dump_verbose_config(f=$stdout)
f.puts "HOMEBREW_VERSION: #{HOMEBREW_VERSION}"
f.puts "ORIGIN: #{origin}"
@@ -140,5 +145,6 @@ module Homebrew
f.puts "Perl: #{describe_perl}"
f.puts "Python: #{describe_python}"
f.puts "Ruby: #{describe_ruby}"
+ f.puts "Java: #{java_version}"
end
end