upgrade: address @MikeMcQuaid's comments
This commit is contained in:
parent
f4707a8041
commit
024007f9e2
@ -255,7 +255,7 @@ module Homebrew
|
||||
[formulae_to_upgrade, formulae_pinned]
|
||||
end
|
||||
|
||||
def broken_dependents(kegs, formulae, scanned = [])
|
||||
def broken_dependents(kegs, formulae, scanned = Set.new)
|
||||
formulae_to_reinstall = Set.new
|
||||
formulae_pinned_and_outdated = Set.new
|
||||
|
||||
@ -264,10 +264,9 @@ module Homebrew
|
||||
descendants = Set.new
|
||||
|
||||
dependents = kegs.select do |keg|
|
||||
keg.runtime_dependencies
|
||||
.any? { |d| d["full_name"] == formula.full_name }
|
||||
end.reject do |keg|
|
||||
scanned.include?(keg)
|
||||
keg = keg.runtime_dependencies
|
||||
.any? { |d| d["full_name"] == formula.full_name }
|
||||
keg unless scanned.include?(keg)
|
||||
end
|
||||
|
||||
next if dependents.empty?
|
||||
@ -292,7 +291,7 @@ module Homebrew
|
||||
descendants << f
|
||||
end
|
||||
|
||||
scanned << dependents
|
||||
scanned.merge dependents
|
||||
|
||||
descendants_to_reinstall, descendants_pinned = broken_dependents(kegs, descendants, scanned)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user