update-report: use appropriate pronoun in update message
This commit is contained in:
parent
3ff5795ae1
commit
81e3aa899d
@ -140,6 +140,11 @@ module Homebrew
|
||||
unless args.preinstall?
|
||||
outdated_formulae = Formula.installed.count(&:outdated?)
|
||||
outdated_casks = Cask::Caskroom.casks.count(&:outdated?)
|
||||
update_pronoun = if (outdated_formulae + outdated_casks) == 1
|
||||
"it"
|
||||
else
|
||||
"them"
|
||||
end
|
||||
msg = ""
|
||||
if outdated_formulae.positive?
|
||||
msg += "#{Tty.bold}#{outdated_formulae}#{Tty.reset} outdated #{"formula".pluralize(outdated_formulae)}"
|
||||
@ -152,7 +157,7 @@ module Homebrew
|
||||
puts_stdout_or_stderr
|
||||
puts_stdout_or_stderr <<~EOS
|
||||
You have #{msg} installed.
|
||||
You can update them with #{Tty.bold}brew upgrade#{Tty.reset}.
|
||||
You can update #{update_pronoun} with #{Tty.bold}brew upgrade#{Tty.reset}.
|
||||
EOS
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user