From 1bcabbfa575c47e3687b90f24608dc4455a8ff4f Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Tue, 25 Apr 2023 14:59:08 +0800 Subject: [PATCH] test_runner_formula: fix caching --- Library/Homebrew/test_runner_formula.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/test_runner_formula.rb b/Library/Homebrew/test_runner_formula.rb index b3e2dded65..2fd0e6b8f4 100644 --- a/Library/Homebrew/test_runner_formula.rb +++ b/Library/Homebrew/test_runner_formula.rb @@ -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