aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Fontaine2015-01-06 10:54:55 +0100
committerMike McQuaid2015-01-22 17:16:36 +0100
commitce73e8334f079ec2b4d8aba88f0fd7c0d4cff5d3 (patch)
tree0e8e51a335b52b0651119984fe16d3cbe9d2a801
parentdd5ba29d3e98accc15f20b4fea3ea676f9aabafe (diff)
downloadhomebrew-ce73e8334f079ec2b4d8aba88f0fd7c0d4cff5d3.tar.bz2
config: add Java to output.
Closes #35596. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
-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