diff options
| author | Jack Nagel | 2014-04-05 12:17:19 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-04-05 12:17:19 -0500 |
| commit | a26601dc2b9ef33491e0df50e64899b823c56b78 (patch) | |
| tree | 767f896aea23999a5f4b0598298f5bd08609b573 /Library/Homebrew/formula_installer.rb | |
| parent | bfeb0a491345bbe231de7009f6b6d8fe8d17634b (diff) | |
| download | homebrew-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.rb | 6 |
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 |
