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
commit07bf57b8eac316a5358d75e701aec14c77170e01 (patch)
treea3f7b9bf6803be241fdf92ff83af2d377feef0b2 /Library
parentf1fc0b788f215e4e977ba6de674d18b6e040ed18 (diff)
downloadbrew-07bf57b8eac316a5358d75e701aec14c77170e01.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