From 394d7be6a415bb46552131e9e18e652f0fc33a40 Mon Sep 17 00:00:00 2001 From: Adam Coffman Date: Thu, 18 Jul 2013 15:18:15 -0500 Subject: 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 --- Library/Homebrew/cmd/upgrade.rb | 1 + 1 file changed, 1 insertion(+) 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? -- cgit v1.2.3