aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/upgrade.rb
diff options
context:
space:
mode:
authorAdam Coffman2013-07-18 15:18:15 -0500
committerJack Nagel2013-07-18 15:35:17 -0500
commit394d7be6a415bb46552131e9e18e652f0fc33a40 (patch)
tree06f6f819ae62cccd320c2f25f1298e60571b3a2e /Library/Homebrew/cmd/upgrade.rb
parent737bb03ab89e69ab399d614e29f36b721e4f596c (diff)
downloadhomebrew-394d7be6a415bb46552131e9e18e652f0fc33a40.tar.bz2
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 #21316. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew/cmd/upgrade.rb')
-rw-r--r--Library/Homebrew/cmd/upgrade.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/upgrade.rb b/Library/Homebrew/cmd/upgrade.rb
index 014f8f807..5b3d5a900 100644
--- a/Library/Homebrew/cmd/upgrade.rb
+++ b/Library/Homebrew/cmd/upgrade.rb
@@ -13,6 +13,7 @@ module Homebrew extend self
if ARGV.named.empty?
outdated = Homebrew.outdated_brews
+ exit 0 if outdated.empty?
else
outdated = ARGV.formulae.select do |f|
if f.installed?