tap_paths: prevent conflicted formulae happen in the same tap
Closes Homebrew/homebrew#40606. Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
parent
9c3a6a3f52
commit
c1fb7a8e4a
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user