diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 723c35d911..4e185d7179 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -539,9 +539,10 @@ class FormulaInstaller if f.keg_only? begin keg.optlink - rescue Exception - onoe "Failed to create: #{f.opt_prefix}" + rescue Keg::LinkError => e + onoe "Failed to create #{f.opt_prefix}" puts "Things that depend on #{f} will probably not build." + puts e end return end