From 1aabba7b9e5ec9d3c3e1e5021236d4d006c97915 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Sun, 23 Jun 2013 16:32:31 -0700 Subject: [PATCH] Show conflicting files on install if linking fails Closes Homebrew/homebrew#18303. Closes Homebrew/homebrew#20726. --- Library/Homebrew/formula_installer.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 06b965e643..44e57c7303 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -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 }