parent
f243163b89
commit
af272e04c7
@ -157,7 +157,17 @@ class Formulary
|
|||||||
def initialize tapped_name
|
def initialize tapped_name
|
||||||
@tapped_name = tapped_name
|
@tapped_name = tapped_name
|
||||||
user, repo, name = tapped_name.split("/", 3).map(&:downcase)
|
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
|
super name, path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user