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,
|
||||
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|
|
||||
send(*options)
|
||||
conflicts "--cask", options[-2]
|
||||
@ -108,6 +111,7 @@ module Homebrew
|
||||
debug: args.debug?,
|
||||
quiet: args.quiet?,
|
||||
verbose: args.verbose?,
|
||||
git: args.git?,
|
||||
)
|
||||
Cleanup.install_formula_clean!(formula)
|
||||
end
|
||||
|
@ -19,7 +19,8 @@ module Homebrew
|
||||
force: false,
|
||||
debug: false,
|
||||
quiet: false,
|
||||
verbose: false
|
||||
verbose: false,
|
||||
git: false
|
||||
)
|
||||
if formula.opt_prefix.directory?
|
||||
keg = Keg.new(formula.opt_prefix.resolved_path)
|
||||
@ -44,6 +45,7 @@ module Homebrew
|
||||
build_bottle: tab&.built_bottle?,
|
||||
force_bottle: force_bottle,
|
||||
build_from_source_formulae: build_from_source_formulae,
|
||||
git: git,
|
||||
interactive: interactive,
|
||||
keep_tmp: keep_tmp,
|
||||
force: force,
|
||||
|
Loading…
x
Reference in New Issue
Block a user