aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-07-24 19:39:09 -0500
committerJack Nagel2014-07-24 19:39:09 -0500
commitbe28500cef9eabd0f718cf00493c189f89feebd1 (patch)
tree388bb97443b5651b15ce04c7c60acaeca9dc0b12 /Library
parent0297a6d768903206f65c80a49a642a4ea69aef29 (diff)
downloadhomebrew-be28500cef9eabd0f718cf00493c189f89feebd1.tar.bz2
Push keg_only special-case into link
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula_installer.rb23
1 files changed, 11 insertions, 12 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index 641ce9a29..723c35d91 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