Skip to content
Snippets Groups Projects
Commit c1fb7a8e authored by Xu Cheng's avatar Xu Cheng
Browse files

tap_paths: prevent conflicted formulae happen in the same tap


Closes Homebrew/homebrew#40606.

Signed-off-by: default avatarXu Cheng <xucheng@me.com>
parent 9c3a6a3f
No related branches found
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment