Add support for the --overwrite flag to brew upgrade to govern the keg-linking step
`FormulaInstaller` already supports this (https://github.com/Homebrew/brew/pull/12691) but I didn't wire it up via `brew upgrade` and the two can be used largely interchangeably
This commit is contained in:
parent
3d948b7803
commit
3d24da1904
@ -75,6 +75,9 @@ module Homebrew
|
||||
env: :display_install_times,
|
||||
description: "Print install times for each package at the end of the run.",
|
||||
}],
|
||||
[:switch, "--overwrite", {
|
||||
description: "Delete files that already exist in the prefix while linking.",
|
||||
}],
|
||||
].each do |args|
|
||||
options = args.pop
|
||||
send(*args, **options)
|
||||
@ -229,6 +232,7 @@ module Homebrew
|
||||
keep_tmp: args.keep_tmp?,
|
||||
debug_symbols: args.debug_symbols?,
|
||||
force: args.force?,
|
||||
overwrite: args.overwrite?,
|
||||
debug: args.debug?,
|
||||
quiet: args.quiet?,
|
||||
verbose: args.verbose?,
|
||||
|
||||
@ -27,6 +27,7 @@ module Homebrew
|
||||
keep_tmp: false,
|
||||
debug_symbols: false,
|
||||
force: false,
|
||||
overwrite: false,
|
||||
debug: false,
|
||||
quiet: false,
|
||||
verbose: false
|
||||
@ -65,6 +66,7 @@ module Homebrew
|
||||
keep_tmp: keep_tmp,
|
||||
debug_symbols: debug_symbols,
|
||||
force: force,
|
||||
overwrite: overwrite,
|
||||
debug: debug,
|
||||
quiet: quiet,
|
||||
verbose: verbose,
|
||||
@ -150,6 +152,7 @@ module Homebrew
|
||||
keep_tmp: false,
|
||||
debug_symbols: false,
|
||||
force: false,
|
||||
overwrite: false,
|
||||
debug: false,
|
||||
quiet: false,
|
||||
verbose: false
|
||||
@ -184,6 +187,7 @@ module Homebrew
|
||||
keep_tmp: keep_tmp,
|
||||
debug_symbols: debug_symbols,
|
||||
force: force,
|
||||
overwrite: overwrite,
|
||||
debug: debug,
|
||||
quiet: quiet,
|
||||
verbose: verbose,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user