aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Coffman2013-07-18 15:18:15 -0500
committerJack Nagel2013-07-18 15:35:17 -0500
commit753adbb0ce1498bd74d1c2935a4394497624b373 (patch)
tree8b632fde9fc4c5b3187d554598267f9b3c39b1b8 /Library
parente33d3e1e5ca69b7ea61d0e2ee8f691530146cf1a (diff)
downloadbrew-753adbb0ce1498bd74d1c2935a4394497624b373.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 Homebrew/homebrew#21316. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-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?