aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula_installer.rb
diff options
context:
space:
mode:
authorJack Nagel2014-04-05 12:17:19 -0500
committerJack Nagel2014-04-05 12:17:19 -0500
commita26601dc2b9ef33491e0df50e64899b823c56b78 (patch)
tree767f896aea23999a5f4b0598298f5bd08609b573 /Library/Homebrew/formula_installer.rb
parentbfeb0a491345bbe231de7009f6b6d8fe8d17634b (diff)
downloadhomebrew-a26601dc2b9ef33491e0df50e64899b823c56b78.tar.bz2
Avoid realpath where it is not necessary
Symlinks in opt and LinkedKegs point directly at a keg in the cellar, so only resolving one symlink should suffice, and make it clear what path we are actually interested in.
Diffstat (limited to 'Library/Homebrew/formula_installer.rb')
-rw-r--r--Library/Homebrew/formula_installer.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index 1b20f8c0f..0bd71c08a 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -147,7 +147,7 @@ class FormulaInstaller
if f.linked_keg.directory?
# some other version is already installed *and* linked
raise CannotInstallFormulaError, <<-EOS.undent
- #{f}-#{f.linked_keg.realpath.basename} already installed
+ #{f}-#{f.linked_keg.resolved_path.basename} already installed
To install this version, first `brew unlink #{f}'
EOS
end
@@ -360,7 +360,7 @@ class FormulaInstaller
tab = Tab.for_formula(df)
if df.linked_keg.directory?
- linked_keg = Keg.new(df.linked_keg.realpath)
+ linked_keg = Keg.new(df.linked_keg.resolved_path)
linked_keg.unlink
end
@@ -545,7 +545,7 @@ class FormulaInstaller
end
def link
- if f.linked_keg.directory? and f.linked_keg.realpath == f.prefix
+ if f.linked_keg.directory? and f.linked_keg.resolved_path == f.prefix
opoo "This keg was marked linked already, continuing anyway"
# otherwise Keg.link will bail
f.linked_keg.unlink