From 07bf57b8eac316a5358d75e701aec14c77170e01 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Thu, 24 Jul 2014 19:39:09 -0500 Subject: [PATCH] Push keg_only special-case into link --- Library/Homebrew/formula_installer.rb | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 641ce9a292..723c35d911 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -409,18 +409,7 @@ class FormulaInstaller install_plist keg = Keg.new(f.prefix) - - if f.keg_only? - begin - keg.optlink - rescue Exception - onoe "Failed to create: #{f.opt_prefix}" - puts "Things that depend on #{f} will probably not build." - end - else - link(keg) - end - + link(keg) fix_install_names(keg) if OS.mac? post_install @@ -547,6 +536,16 @@ class FormulaInstaller end def link(keg) + if f.keg_only? + begin + keg.optlink + rescue Exception + onoe "Failed to create: #{f.opt_prefix}" + puts "Things that depend on #{f} will probably not build." + end + return + end + if keg.linked? opoo "This keg was marked linked already, continuing anyway" keg.remove_linked_keg_record