aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorXu Cheng2015-08-15 16:12:42 +0800
committerXu Cheng2015-08-15 16:12:42 +0800
commit8a766c476808d0c1afd29c55a6f950d074196833 (patch)
tree894bed45b2583a02221bcc36ffae345a49b4f2b5 /Library
parentc518e503202f8c07685dc00754a794a73ebc5754 (diff)
downloadbrew-8a766c476808d0c1afd29c55a6f950d074196833.tar.bz2
Formulary.to_rack: follow the symlink
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formulary.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb
index 6735859ca..755d9f87c 100644
--- a/Library/Homebrew/formulary.rb
+++ b/Library/Homebrew/formulary.rb
@@ -198,12 +198,11 @@ class Formulary
def self.to_rack(ref)
# First, check whether the rack with the given name exists.
if (rack = HOMEBREW_CELLAR/File.basename(ref, ".rb")).directory?
- return rack
+ return rack.resolved_path
end
# Second, use canonical name to locate rack.
- name = canonical_name(ref)
- HOMEBREW_CELLAR/name
+ (HOMEBREW_CELLAR/canonical_name(ref)).resolved_path
end
def self.canonical_name(ref)