config: add Java to output.

Closes Homebrew/homebrew#35596.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Baptiste Fontaine 2015-01-06 10:54:55 +01:00 committed by Mike McQuaid
parent 011b47aeff
commit aec2f01a55

View File

@ -119,6 +119,11 @@ module Homebrew
s s
end end
def java_version
java = `java -version 2>&1`.lines.first.chomp
java =~ /java version "(.+?)"/ ? $1 : java
end
def dump_verbose_config(f=$stdout) def dump_verbose_config(f=$stdout)
f.puts "HOMEBREW_VERSION: #{HOMEBREW_VERSION}" f.puts "HOMEBREW_VERSION: #{HOMEBREW_VERSION}"
f.puts "ORIGIN: #{origin}" f.puts "ORIGIN: #{origin}"
@ -140,5 +145,6 @@ module Homebrew
f.puts "Perl: #{describe_perl}" f.puts "Perl: #{describe_perl}"
f.puts "Python: #{describe_python}" f.puts "Python: #{describe_python}"
f.puts "Ruby: #{describe_ruby}" f.puts "Ruby: #{describe_ruby}"
f.puts "Java: #{java_version}"
end end
end end