aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula_installer.rb
diff options
context:
space:
mode:
authorJack Nagel2014-04-21 09:40:24 -0500
committerJack Nagel2014-04-21 12:43:06 -0500
commit54afe890617f04248af50dbb6a673b1e8d98b864 (patch)
tree9012614821e38ff926777061d35f9c9818a6a660 /Library/Homebrew/formula_installer.rb
parent19173bf362b292cd28b56c9a9a6ebbb9c8e667fa (diff)
downloadhomebrew-54afe890617f04248af50dbb6a673b1e8d98b864.tar.bz2
Adjust installer for updated link error handling
Diffstat (limited to 'Library/Homebrew/formula_installer.rb')
-rw-r--r--Library/Homebrew/formula_installer.rb16
1 files changed, 11 insertions, 5 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index e9c2d7638..c8847eb08 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -561,18 +561,24 @@ class FormulaInstaller
begin
keg.link
- rescue Exception => e
+ rescue Keg::LinkError => e
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 "You can try again using:"
+ puts " 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 debug?
@show_summary_heading = true
- ignore_interrupts{ keg.unlink }
- raise unless e.kind_of? RuntimeError
+ rescue Exception => e
+ onoe "An unexpected error occurred during the `brew link` step"
+ puts "The formula built, but is not symlinked into #{HOMEBREW_PREFIX}"
+ puts e
+ puts e.backtrace if debug?
+ @show_summary_heading = true
+ ignore_interrupts { keg.unlink }
+ raise
end
end