Show conflicting files on install if linking fails

Closes Homebrew/homebrew#18303.
Closes Homebrew/homebrew#20726.
This commit is contained in:
Adam Vandenberg 2013-06-23 16:32:31 -07:00
parent 59e6249862
commit 1aabba7b9e

View File

@ -364,6 +364,10 @@ class FormulaInstaller
onoe "The `brew link` step did not complete successfully"
puts "The formula built, but is not symlinked into #{HOMEBREW_PREFIX}"
puts "You can try again using `brew link #{f.name}'"
puts
puts "Possible conflicting files are:"
mode = OpenStruct.new(:dry_run => true, :overwrite => true)
keg.link(mode)
ohai e, e.backtrace if ARGV.debug?
@show_summary_heading = true
ignore_interrupts{ keg.unlink }