mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
reinstall: add support for the --git option
This commit is contained in:
parent
eec2d609bd
commit
128f63db53
@ -57,6 +57,9 @@ module Homebrew
|
|||||||
env: :display_install_times,
|
env: :display_install_times,
|
||||||
description: "Print install times for each formula at the end of the run.",
|
description: "Print install times for each formula at the end of the run.",
|
||||||
}],
|
}],
|
||||||
|
[:switch, "-g", "--git", {
|
||||||
|
description: "Create a Git repository, useful for creating patches to the software.",
|
||||||
|
}],
|
||||||
].each do |options|
|
].each do |options|
|
||||||
send(*options)
|
send(*options)
|
||||||
conflicts "--cask", options[-2]
|
conflicts "--cask", options[-2]
|
||||||
@ -108,6 +111,7 @@ module Homebrew
|
|||||||
debug: args.debug?,
|
debug: args.debug?,
|
||||||
quiet: args.quiet?,
|
quiet: args.quiet?,
|
||||||
verbose: args.verbose?,
|
verbose: args.verbose?,
|
||||||
|
git: args.git?,
|
||||||
)
|
)
|
||||||
Cleanup.install_formula_clean!(formula)
|
Cleanup.install_formula_clean!(formula)
|
||||||
end
|
end
|
||||||
|
@ -19,7 +19,8 @@ module Homebrew
|
|||||||
force: false,
|
force: false,
|
||||||
debug: false,
|
debug: false,
|
||||||
quiet: false,
|
quiet: false,
|
||||||
verbose: false
|
verbose: false,
|
||||||
|
git: false
|
||||||
)
|
)
|
||||||
if formula.opt_prefix.directory?
|
if formula.opt_prefix.directory?
|
||||||
keg = Keg.new(formula.opt_prefix.resolved_path)
|
keg = Keg.new(formula.opt_prefix.resolved_path)
|
||||||
@ -44,6 +45,7 @@ module Homebrew
|
|||||||
build_bottle: tab&.built_bottle?,
|
build_bottle: tab&.built_bottle?,
|
||||||
force_bottle: force_bottle,
|
force_bottle: force_bottle,
|
||||||
build_from_source_formulae: build_from_source_formulae,
|
build_from_source_formulae: build_from_source_formulae,
|
||||||
|
git: git,
|
||||||
interactive: interactive,
|
interactive: interactive,
|
||||||
keep_tmp: keep_tmp,
|
keep_tmp: keep_tmp,
|
||||||
force: force,
|
force: force,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user