mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Refactor FormulaLoader#get_formula
.
This commit is contained in:
parent
6b0678e8ed
commit
08e35e9cb4
@ -124,8 +124,8 @@ module Formulary
|
|||||||
# `alias_path` can be overridden here in case an alias was used to refer to
|
# `alias_path` can be overridden here in case an alias was used to refer to
|
||||||
# a formula that was loaded in another way.
|
# a formula that was loaded in another way.
|
||||||
def get_formula(spec, alias_path: nil, force_bottle: false, flags: [])
|
def get_formula(spec, alias_path: nil, force_bottle: false, flags: [])
|
||||||
klass(flags: flags)
|
alias_path ||= self.alias_path
|
||||||
.new(name, path, spec, alias_path: alias_path || self.alias_path, force_bottle: force_bottle)
|
klass(flags: flags).new(name, path, spec, alias_path: alias_path, force_bottle: force_bottle)
|
||||||
end
|
end
|
||||||
|
|
||||||
def klass(flags:)
|
def klass(flags:)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user