mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
renaming parameter, method and struct to make it more understandable
This commit is contained in:
parent
0db36b57c8
commit
90b697995f
@ -7,8 +7,8 @@ require "messages"
|
|||||||
|
|
||||||
module Homebrew
|
module Homebrew
|
||||||
module Reinstall
|
module Reinstall
|
||||||
FormulaKeg = Struct.new(:formula_installer, :keg, :formula, :options)
|
InstallationContext = Struct.new(:formula_installer, :keg, :formula, :options)
|
||||||
def self.formula_installer(
|
def self.build_install_context(
|
||||||
formula,
|
formula,
|
||||||
flags:,
|
flags:,
|
||||||
force_bottle: false,
|
force_bottle: false,
|
||||||
@ -62,11 +62,11 @@ module Homebrew
|
|||||||
verbose:,
|
verbose:,
|
||||||
}.compact,
|
}.compact,
|
||||||
)
|
)
|
||||||
FormulaKeg.new(fi, keg, formula, options)
|
InstallationContext.new(fi, keg, formula, options)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.reinstall_formula(
|
def self.reinstall_formula(
|
||||||
formula_keg,
|
install_context,
|
||||||
flags:,
|
flags:,
|
||||||
force_bottle: false,
|
force_bottle: false,
|
||||||
build_from_source_formulae: [],
|
build_from_source_formulae: [],
|
||||||
@ -79,10 +79,10 @@ module Homebrew
|
|||||||
verbose: false,
|
verbose: false,
|
||||||
git: false
|
git: false
|
||||||
)
|
)
|
||||||
formula_installer = formula_keg.formula_installer
|
formula_installer = install_context.formula_installer
|
||||||
keg = formula_keg.keg
|
keg = install_context.keg
|
||||||
formula = formula_keg.formula
|
formula = install_context.formula
|
||||||
options = formula_keg.options
|
options = install_context.options
|
||||||
link_keg = keg.linked?
|
link_keg = keg.linked?
|
||||||
formula_installer.prelude
|
formula_installer.prelude
|
||||||
formula_installer.fetch
|
formula_installer.fetch
|
||||||
|
Loading…
x
Reference in New Issue
Block a user