From f481f1fa92eb2909f342b549c26d3391b8b50e2e Mon Sep 17 00:00:00 2001 From: Eric Knibbe Date: Tue, 26 Mar 2024 11:36:47 -0400 Subject: [PATCH] formula_installer: handle nil runtime dependencies --- Library/Homebrew/formula_installer.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 116a6e28ac8b9..d5b49c9e767c7 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -1209,7 +1209,7 @@ def fetch_bottle_tab @fetch_bottle_tab ||= begin formula.fetch_bottle_tab @bottle_tab_runtime_dependencies = formula.bottle_tab_attributes - .fetch("runtime_dependencies", []) + .fetch("runtime_dependencies", []).then { |deps| deps || [] } .each_with_object({}) { |dep, h| h[dep["full_name"]] = dep } .freeze true @@ -1262,7 +1262,7 @@ def pour tab = Utils::Bottles.load_tab(formula) # fill in missing/outdated parts of the tab - # keep in sync with Tab#to_bottle_json + # keep in sync with Tab#to_bottle_hash tab.used_options = [] tab.unused_options = [] tab.built_as_bottle = true