Fix caching in Formula#runtime_installed_formula_dependents

This commit is contained in:
fn ⌃ ⌥ 2022-08-18 15:14:44 -07:00 committed by GitHub
parent 8f54e57422
commit 2459aee5ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2003,7 +2003,7 @@ class Formula
# `any_installed_keg` and `runtime_dependencies` `select`s ensure # `any_installed_keg` and `runtime_dependencies` `select`s ensure
# that we don't end up with something `Formula#runtime_dependencies` can't # that we don't end up with something `Formula#runtime_dependencies` can't
# read from a `Tab`. # read from a `Tab`.
Formula.cache[:runtime_installed_formula_dependents] = {} Formula.cache[:runtime_installed_formula_dependents] ||= {}
Formula.cache[:runtime_installed_formula_dependents][full_name] ||= Formula.installed Formula.cache[:runtime_installed_formula_dependents][full_name] ||= Formula.installed
.select(&:any_installed_keg) .select(&:any_installed_keg)
.select(&:runtime_dependencies) .select(&:runtime_dependencies)