cmd/upgrade, reinstall: don't install on dry-run.

Fixes #7033.
This commit is contained in:
Mike McQuaid 2020-02-14 12:18:55 +00:00
parent 516d7e8278
commit ac97c8545a
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70
2 changed files with 4 additions and 0 deletions

View File

@ -326,6 +326,8 @@ module Homebrew
.join(", ")
end
return if args.dry_run?
reinstallable_broken_dependents.each do |f|
reinstall_formula(f, build_from_source: true)
rescue FormulaInstallationAlreadyAttemptedError

View File

@ -8,6 +8,8 @@ module Homebrew
module_function
def reinstall_formula(f, build_from_source: false)
return if args.dry_run?
if f.opt_prefix.directory?
keg = Keg.new(f.opt_prefix.resolved_path)
tab = Tab.for_keg(keg)