BottleLoader: use bottle_resolve_formula_names
This commit is contained in:
parent
557ddcac36
commit
99ba9faf09
@ -69,17 +69,8 @@ class Formulary
|
|||||||
class BottleLoader < FormulaLoader
|
class BottleLoader < FormulaLoader
|
||||||
def initialize bottle_name
|
def initialize bottle_name
|
||||||
@bottle_filename = Pathname(bottle_name).realpath
|
@bottle_filename = Pathname(bottle_name).realpath
|
||||||
name_without_version = bottle_filename_formula_name @bottle_filename
|
name, full_name = bottle_resolve_formula_names @bottle_filename
|
||||||
if name_without_version.empty?
|
super name, Formulary.path(full_name)
|
||||||
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)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_formula(spec)
|
def get_formula(spec)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user