From 9ca233812ce95b62cf79f75efdcbe1b73cb7a1ea Mon Sep 17 00:00:00 2001 From: Adam Vandenberg <flangy@gmail.com> Date: Sat, 25 Feb 2012 20:57:00 -0800 Subject: [PATCH] List offending jar files when installed to lib --- Library/Homebrew/formula_installer.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 979cf02e34..e61967bb52 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -250,15 +250,17 @@ class FormulaInstaller end def check_jars - # Check for Jars in lib return unless File.exist? f.lib - unless f.lib.children.select{|g| g.to_s =~ /\.jar$/}.empty? + jars = f.lib.children.select{|g| g.to_s =~ /\.jar$/} + unless jars.empty? opoo 'JARs were installed to "lib".' puts "Installing JARs to \"lib\" can cause conflicts between packages." puts "For Java software, it is typically better for the formula to" puts "install to \"libexec\" and then symlink or wrap binaries into \"bin\"." puts "See \"activemq\", \"jruby\", etc. for examples." + puts "The offending files are:" + puts jars @show_summary_heading = true end end -- GitLab