Merge pull request #6728 from MikeMcQuaid/upgrade-indempotent

upgrade: don't error if already installed.
This commit is contained in:
Mike McQuaid 2019-11-13 16:18:00 +00:00 committed by GitHub
commit 460da9f80d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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?)