BottleLoader: use bottle_resolve_formula_names

This commit is contained in:
Xu Cheng 2015-05-27 22:49:18 +08:00
parent 557ddcac36
commit 99ba9faf09

View File

@ -69,17 +69,8 @@ class Formulary
class BottleLoader < FormulaLoader
def initialize bottle_name
@bottle_filename = Pathname(bottle_name).realpath
name_without_version = bottle_filename_formula_name @bottle_filename
if name_without_version.empty?
if ARGV.homebrew_developer?
opoo "Add a new regex to bottle_version.rb to parse this filename."
end
name = bottle_name
else
name = name_without_version
end
super name, Formulary.path(name)
name, full_name = bottle_resolve_formula_names @bottle_filename
super name, Formulary.path(full_name)
end
def get_formula(spec)