diff options
| author | Mike McQuaid | 2017-05-16 08:45:45 +0100 |
|---|---|---|
| committer | GitHub | 2017-05-16 08:45:45 +0100 |
| commit | aeaf9af711e1c76f93ab8cf827e18198d42cc56f (patch) | |
| tree | f55178369c9187ce8fd19e72b8a74a73dc0cd8c9 /Library/Homebrew/cmd | |
| parent | ea8be174f6009bc9bdec67b13ca501b5b83fc4b8 (diff) | |
| parent | 8e2198ff018548df6aa0854f22a111bacee081a7 (diff) | |
| download | brew-aeaf9af711e1c76f93ab8cf827e18198d42cc56f.tar.bz2 | |
Merge pull request #2470 from johnhawkinson/conflicts-info
Display formula conflict reasons
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/info.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb index e7ad6821d..ba920d005 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? |
