diff options
| author | Jack Nagel | 2013-07-15 23:47:02 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-07-15 23:47:02 -0500 |
| commit | 1678a4a65d9a592c137f49e4bd558dfacc67c46d (patch) | |
| tree | 3a18732e65ad0bf6d269717f3f53007b95406087 /Library | |
| parent | e8354e2fb52267978de47104a7118c3ed38376c1 (diff) | |
| download | brew-1678a4a65d9a592c137f49e4bd558dfacc67c46d.tar.bz2 | |
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.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/upgrade.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/upgrade.rb b/Library/Homebrew/cmd/upgrade.rb index 28882360b..d15e09b82 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}:" |
