diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb index e7ad6821d1..ba920d005b 100644 --- a/Library/Homebrew/cmd/info.rb +++ b/Library/Homebrew/cmd/info.rb @@ -123,8 +123,16 @@ module Homebrew puts f.desc if f.desc puts Formatter.url(f.homepage) if f.homepage - conflicts = f.conflicts.map(&:name).sort! - puts "Conflicts with: #{conflicts*", "}" unless conflicts.empty? + conflicts = f.conflicts.map do |c| + reason = " (because #{c.reason})" if c.reason + "#{c.name}#{reason}" + end.sort! + unless conflicts.empty? + puts <<-EOS.undent + Conflicts with: + #{conflicts.join(" \n")} + EOS + end kegs = f.installed_kegs.sort_by(&:version) if kegs.empty? diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 1b3b718da6..1230199bf4 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -2366,7 +2366,7 @@ class Formula end # If this formula conflicts with another one. - #
conflicts_with "imagemagick", :because => "because this is just a stupid example"+ #
conflicts_with "imagemagick", :because => "because both install 'convert' binaries"def conflicts_with(*names) opts = names.last.is_a?(Hash) ? names.pop : {} names.each { |name| conflicts << FormulaConflict.new(name, opts[:because]) }