uninstall: don't need kegs to exist for --force.

Otherwise there's an error which is a regression on previous
functionality. This mirrors `rm -f` which doesn't fail if a file doesn't
exist.
This commit is contained in:
Mike McQuaid 2016-11-11 13:15:46 +00:00
parent 8241bbb15b
commit 4538d80db1

View File

@ -21,6 +21,7 @@ module Homebrew
kegs_by_rack = if ARGV.force? kegs_by_rack = if ARGV.force?
Hash[ARGV.named.map do |name| Hash[ARGV.named.map do |name|
rack = Formulary.to_rack(name) rack = Formulary.to_rack(name)
next unless rack.directory?
[rack, rack.subdirs.map { |d| Keg.new(d) }] [rack, rack.subdirs.map { |d| Keg.new(d) }]
end] end]
else else