feat: Install an unlinked formula via brew install if --overwrite is passed
If the intention is to overwrite any existing links, then `brew install` should go on to install over an unlinked formula
This commit is contained in:
parent
3291ad4fc7
commit
a5db113d91
@ -289,6 +289,7 @@ module Homebrew
|
||||
only_dependencies: args.only_dependencies?,
|
||||
force: args.force?,
|
||||
quiet: args.quiet?,
|
||||
overwrite: args.overwrite?,
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
@ -60,7 +60,8 @@ module Homebrew
|
||||
fetch_head: false,
|
||||
only_dependencies: false,
|
||||
force: false,
|
||||
quiet: false
|
||||
quiet: false,
|
||||
overwrite: false
|
||||
)
|
||||
# head-only without --HEAD is an error
|
||||
if !head && formula.stable.nil?
|
||||
@ -132,7 +133,7 @@ module Homebrew
|
||||
The currently linked version is: #{formula.linked_version}
|
||||
EOS
|
||||
end
|
||||
elsif only_dependencies
|
||||
elsif only_dependencies || (!formula.linked? && overwrite)
|
||||
msg = nil
|
||||
return true
|
||||
elsif !formula.linked? || formula.keg_only?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user