Skip to content

Commit

Permalink
cmd/upgrade: clarify why it is upgrading dependents.
Browse files Browse the repository at this point in the history
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
  • Loading branch information
rdp and MikeMcQuaid committed Feb 25, 2022
1 parent bf37587 commit 3cb19ef
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Library/Homebrew/upgrade.rb
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,10 @@ def check_installed_dependents(
if upgradeable_dependents.blank?
ohai "No outdated dependents to upgrade!" unless dry_run
else
plural = "dependent".pluralize(upgradeable_dependents.count)
verb = dry_run ? "Would upgrade" : "Upgrading"
ohai "#{verb} #{upgradeable_dependents.count} #{plural}:"
dependent_plural = "dependent".pluralize(upgradeable_dependents.count)
formula_plural = "formula".pluralize(installed_formulae.count)
upgrade_verb = dry_run ? "Would upgrade" : "Upgrading"
ohai "#{upgrade_verb} #{upgradeable_dependents.count} #{dependent_plural} of upgraded #{formula_plural}:"
Upgrade.puts_no_installed_dependents_check_disable_message_if_not_already!
formulae_upgrades = upgradeable_dependents.map do |f|
name = f.full_specified_name
Expand Down

0 comments on commit 3cb19ef

Please sign in to comment.