upgrade: put exit statements in both conditional branches
This check was only occurring in one branch of the conditional. As a result, if you ran `brew upgrade` with no args and there were no packages to upgrade, the nonsensical message "==> Upgrading 0 outdated package, with result:" would be printed. Closes Homebrew/homebrew#21316. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
e33d3e1e5c
commit
753adbb0ce
@ -13,6 +13,7 @@ module Homebrew extend self
|
|||||||
|
|
||||||
if ARGV.named.empty?
|
if ARGV.named.empty?
|
||||||
outdated = Homebrew.outdated_brews
|
outdated = Homebrew.outdated_brews
|
||||||
|
exit 0 if outdated.empty?
|
||||||
else
|
else
|
||||||
outdated = ARGV.formulae.select do |f|
|
outdated = ARGV.formulae.select do |f|
|
||||||
if f.installed?
|
if f.installed?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user