aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formulary.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb
index ac4e8d18f..77ec98a37 100644
--- a/Library/Homebrew/formulary.rb
+++ b/Library/Homebrew/formulary.rb
@@ -157,7 +157,17 @@ class Formulary
def initialize tapped_name
@tapped_name = tapped_name
user, repo, name = tapped_name.split("/", 3).map(&:downcase)
- path = Pathname.new("#{HOMEBREW_LIBRARY}/Taps/#{user}-#{repo}/#{name}.rb")
+ tap = Pathname.new("#{HOMEBREW_LIBRARY}/Taps/#{user}-#{repo}")
+ path = tap.join("#{name}.rb")
+
+ if tap.directory?
+ tap.find_formula do |child|
+ if child.basename(".rb").to_s == name
+ path = tap.join(child)
+ end
+ end
+ end
+
super name, path
end