From 1678a4a65d9a592c137f49e4bd558dfacc67c46d Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Mon, 15 Jul 2013 23:47:02 -0500 Subject: [PATCH] upgrade: remove redundant conditional Since e1c62c35465eb6149688c745e4309438c08c410b, we exit early if the outdated array is empty, so we no longer need to check this before proceeding. --- Library/Homebrew/cmd/upgrade.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/cmd/upgrade.rb b/Library/Homebrew/cmd/upgrade.rb index 28882360ba..d15e09b82e 100644 --- a/Library/Homebrew/cmd/upgrade.rb +++ b/Library/Homebrew/cmd/upgrade.rb @@ -31,10 +31,8 @@ module Homebrew extend self outdated -= pinned end - if outdated.length > 0 - oh1 "Upgrading #{outdated.length} outdated package#{outdated.length.plural_s}, with result:" - puts outdated.map{ |f| "#{f.name} #{f.version}" } * ", " - end + oh1 "Upgrading #{outdated.length} outdated package#{outdated.length.plural_s}, with result:" + puts outdated.map{ |f| "#{f.name} #{f.version}" } * ", " if not upgrade_pinned? and pinned.length > 0 oh1 "Not upgrading #{pinned.length} pinned package#{pinned.length.plural_s}:"