uninstall, keg: update style

This commit is contained in:
Alyssa Ross 2016-10-25 23:48:34 +01:00
parent d0ad097082
commit 5a3d6c4c8f
2 changed files with 4 additions and 4 deletions

View File

@ -16,10 +16,10 @@ module Homebrew
raise KegUnspecifiedError if ARGV.named.empty? raise KegUnspecifiedError if ARGV.named.empty?
kegs_by_rack = if ARGV.force? kegs_by_rack = if ARGV.force?
Hash[ARGV.named.map { |name| Hash[ARGV.named.map do |name|
rack = Formulary.to_rack(name) rack = Formulary.to_rack(name)
[rack, rack.subdirs.map { |d| Keg.new(d) }] [rack, rack.subdirs.map { |d| Keg.new(d) }]
}] end]
else else
ARGV.kegs.group_by(&:rack) ARGV.kegs.group_by(&:rack)
end end

View File

@ -104,9 +104,9 @@ class Keg
# so need them to be calculated now. # so need them to be calculated now.
# #
# This happens after the initial dependency check because it's sloooow. # This happens after the initial dependency check because it's sloooow.
remaining_formulae = Formula.installed.select { |f| remaining_formulae = Formula.installed.select do |f|
f.installed_kegs.any? { |k| Tab.for_keg(k).runtime_dependencies.nil? } f.installed_kegs.any? { |k| Tab.for_keg(k).runtime_dependencies.nil? }
} end
keg_names = kegs.map(&:name) keg_names = kegs.map(&:name)
kegs_by_name = kegs.group_by(&:to_formula) kegs_by_name = kegs.group_by(&:to_formula)