test_runner_formula: fix caching

This commit is contained in:
Carlo Cabrera 2023-04-25 14:59:08 +08:00
parent 97655276b2
commit 1bcabbfa57
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0

View File

@ -91,7 +91,7 @@ class TestRunnerFormula
def dependents(platform:, arch:, macos_version:)
cache_key = :"#{platform}_#{arch}_#{macos_version}"
@dependent_hash.fetch(cache_key) do
@dependent_hash[cache_key] ||= begin
all = eval_all || Homebrew::EnvConfig.eval_all?
formula_selector, eval_all_env = if all
[:all, "1"]
@ -112,5 +112,7 @@ class TestRunnerFormula
Homebrew::SimulateSystem.clear
end
end
@dependent_hash.fetch(cache_key)
end
end