Skip to content
Snippets Groups Projects
Commit 5de3686c authored by Frizlab's avatar Frizlab Committed by Mike McQuaid
Browse files

upgrade: fix output when no packages to upgrade.


When upgrading, if the only package to upgrade is a
pinned package, the output looked like that:
	==> Upgrading 0 packages, with result:

	==> Not upgrading 1 pinned package:
	<<package_name & version>>

The blank line is not beautiful. This commit fixes
the output and replaces with:
	==> No packages to upgrade
	==> Not upgrading 1 pinned package:
	<<package_name & version>>

Closes Homebrew/homebrew#26157.

Signed-off-by: default avatarMike McQuaid <mike@mikemcquaid.com>
parent 8c6c644a
No related branches found
No related tags found
No related merge requests found
......@@ -34,8 +34,12 @@ module Homebrew extend self
outdated -= pinned
end
oh1 "Upgrading #{outdated.length} outdated package#{outdated.length.plural_s}, with result:"
puts outdated.map{ |f| "#{f.name} #{f.version}" } * ", "
unless outdated.empty?
oh1 "Upgrading #{outdated.length} outdated package#{outdated.length.plural_s}, with result:"
puts outdated.map{ |f| "#{f.name} #{f.version}" } * ", "
else
oh1 "No packages to upgrade"
end
unless upgrade_pinned? || pinned.empty?
oh1 "Not upgrading #{pinned.length} pinned package#{pinned.length.plural_s}:"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment