aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-04-07 18:44:29 -0500
committerJack Nagel2014-04-07 18:44:29 -0500
commitaf272e04c7167d348d2363a5e02bba4029b903c7 (patch)
tree517a0724dcc7f1ba0f37275a5fa9b44a06960ffe /Library
parentf243163b899a57a6323807b7ab2f93585d6ce23d (diff)
downloadbrew-af272e04c7167d348d2363a5e02bba4029b903c7.tar.bz2
Restore recursive tap search
Fixes Homebrew/homebrew#28234.
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