diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formulary.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index cc59b3472..72024642c 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -244,8 +244,11 @@ class Formulary def self.tap_paths(name) name = name.downcase Dir["#{HOMEBREW_LIBRARY}/Taps/*/*/"].map do |tap| - Pathname.glob(["#{tap}#{name}.rb", "#{tap}Formula/#{name}.rb", - "#{tap}HomebrewFormula/#{name}.rb"]) - end.flatten.select(&:file?) + Pathname.glob([ + "#{tap}Formula/#{name}.rb", + "#{tap}HomebrewFormula/#{name}.rb", + "#{tap}#{name}.rb", + ]).detect(&:file?) + end.compact end end |
