upgrade: don't error if already installed.

I've been convinced idempotency is a good thing for this command so this
would be a good thing to get out for 2.2.0.
This commit is contained in:
Mike McQuaid 2019-11-12 16:18:54 -08:00
parent a6f244dfc7
commit 9d2cb8e9b3
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -75,13 +75,13 @@ module Homebrew
(ARGV.resolved_formulae - outdated).each do |f|
versions = f.installed_kegs.map(&:version)
if versions.empty?
onoe "#{f.full_specified_name} not installed"
ofail "#{f.full_specified_name} not installed"
else
version = versions.max
onoe "#{f.full_specified_name} #{version} already installed"
opoo "#{f.full_specified_name} #{version} already installed"
end
end
exit 1 if outdated.empty?
exit
end
pinned = outdated.select(&:pinned?)