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:
Xu Cheng 2015-05-15 19:41:31 +08:00
parent 074de88a9b
commit e91d152af8

View File

@ -202,6 +202,10 @@ class Formulary
def self.canonical_name(ref)
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
def self.path(ref)