Formulary#canonical_name: handle TapFormulaAmbiguityError
If there are multiple tap formulae with the name of ref, then ref is the canonical name
This commit is contained in:
parent
074de88a9b
commit
e91d152af8
@ -202,6 +202,10 @@ class Formulary
|
|||||||
|
|
||||||
def self.canonical_name(ref)
|
def self.canonical_name(ref)
|
||||||
loader_for(ref).name
|
loader_for(ref).name
|
||||||
|
rescue TapFormulaAmbiguityError
|
||||||
|
# If there are multiple tap formulae with the name of ref,
|
||||||
|
# then ref is the canonical name
|
||||||
|
ref.downcase
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.path(ref)
|
def self.path(ref)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user