From af272e04c7167d348d2363a5e02bba4029b903c7 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Mon, 7 Apr 2014 18:44:29 -0500 Subject: [PATCH] Restore recursive tap search Fixes Homebrew/homebrew#28234. --- Library/Homebrew/formulary.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index ac4e8d18f7..77ec98a376 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