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.
This commit is contained in:
Jack Nagel 2013-07-15 23:47:02 -05:00
parent e8354e2fb5
commit 1678a4a65d

View File

@ -31,10 +31,8 @@ module Homebrew extend self
outdated -= pinned outdated -= pinned
end end
if outdated.length > 0
oh1 "Upgrading #{outdated.length} outdated package#{outdated.length.plural_s}, with result:" oh1 "Upgrading #{outdated.length} outdated package#{outdated.length.plural_s}, with result:"
puts outdated.map{ |f| "#{f.name} #{f.version}" } * ", " puts outdated.map{ |f| "#{f.name} #{f.version}" } * ", "
end
if not upgrade_pinned? and pinned.length > 0 if not upgrade_pinned? and pinned.length > 0
oh1 "Not upgrading #{pinned.length} pinned package#{pinned.length.plural_s}:" oh1 "Not upgrading #{pinned.length} pinned package#{pinned.length.plural_s}:"