Merge pull request #9176 from EricFromCanada/show-upgradeable-dependents

upgrade: show upgradeable dependents during dry run
This commit is contained in:
Mike McQuaid 2020-11-18 09:14:20 +00:00 committed by GitHub
commit f00e094884
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -289,7 +289,7 @@ module Homebrew
Cleanup.install_formula_clean!(f) Cleanup.install_formula_clean!(f)
end end
Upgrade.check_installed_dependents(args: args) Upgrade.check_installed_dependents(installed_formulae, args: args)
Homebrew.messages.display_messages(display_times: args.display_times?) Homebrew.messages.display_messages(display_times: args.display_times?)
rescue FormulaUnreadableError, FormulaClassUnavailableError, rescue FormulaUnreadableError, FormulaClassUnavailableError,

View File

@ -102,7 +102,7 @@ module Homebrew
Cleanup.install_formula_clean!(f) Cleanup.install_formula_clean!(f)
end end
Upgrade.check_installed_dependents(args: args) Upgrade.check_installed_dependents(formulae, args: args)
if casks.any? if casks.any?
Cask::Cmd::Reinstall.reinstall_casks( Cask::Cmd::Reinstall.reinstall_casks(

View File

@ -172,7 +172,7 @@ module Homebrew
Upgrade.upgrade_formulae(formulae_to_install, args: args) Upgrade.upgrade_formulae(formulae_to_install, args: args)
Upgrade.check_installed_dependents(args: args) Upgrade.check_installed_dependents(formulae_to_install, args: args)
Homebrew.messages.display_messages(display_times: args.display_times?) Homebrew.messages.display_messages(display_times: args.display_times?)
end end

View File

@ -134,10 +134,10 @@ module Homebrew
end end
end end
def check_installed_dependents(args:) def check_installed_dependents(formulae, args:)
return if Homebrew::EnvConfig.no_installed_dependents_check? return if Homebrew::EnvConfig.no_installed_dependents_check?
installed_formulae = FormulaInstaller.installed.to_a installed_formulae = args.dry_run? ? formulae : FormulaInstaller.installed.to_a
return if installed_formulae.empty? return if installed_formulae.empty?
already_broken_dependents = check_broken_dependents(installed_formulae) already_broken_dependents = check_broken_dependents(installed_formulae)