Skip to content

Commit

Permalink
clean up fetch_bottle_tab
Browse files Browse the repository at this point in the history
  • Loading branch information
dduugg committed Sep 10, 2024
1 parent 17b6948 commit 44970f7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Library/Homebrew/formula_installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1282,16 +1282,18 @@ def previously_fetched_formula

sig { void }
def fetch_bottle_tab
@fetch_bottle_tab ||= begin
return if @fetch_bottle_tab

begin
formula.fetch_bottle_tab
@bottle_tab_runtime_dependencies = formula.bottle_tab_attributes
.fetch("runtime_dependencies", []).then { |deps| deps || [] }
.each_with_object({}) { |dep, h| h[dep["full_name"]] = dep }
.freeze
true
rescue DownloadError, ArgumentError
@fetch_bottle_tab = T.let(true, T.nilable(TrueClass))
# do nothing
end
@fetch_bottle_tab = T.let(true, T.nilable(TrueClass))
end

sig { void }
Expand Down

0 comments on commit 44970f7

Please sign in to comment.