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:
parent
a6f244dfc7
commit
9d2cb8e9b3
@ -75,13 +75,13 @@ module Homebrew
|
|||||||
(ARGV.resolved_formulae - outdated).each do |f|
|
(ARGV.resolved_formulae - outdated).each do |f|
|
||||||
versions = f.installed_kegs.map(&:version)
|
versions = f.installed_kegs.map(&:version)
|
||||||
if versions.empty?
|
if versions.empty?
|
||||||
onoe "#{f.full_specified_name} not installed"
|
ofail "#{f.full_specified_name} not installed"
|
||||||
else
|
else
|
||||||
version = versions.max
|
version = versions.max
|
||||||
onoe "#{f.full_specified_name} #{version} already installed"
|
opoo "#{f.full_specified_name} #{version} already installed"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
exit 1 if outdated.empty?
|
exit
|
||||||
end
|
end
|
||||||
|
|
||||||
pinned = outdated.select(&:pinned?)
|
pinned = outdated.select(&:pinned?)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user