diff --git a/Library/Homebrew/dev-cmd/unbottled.rb b/Library/Homebrew/dev-cmd/unbottled.rb index 3f263119e6..0d3e6201f9 100644 --- a/Library/Homebrew/dev-cmd/unbottled.rb +++ b/Library/Homebrew/dev-cmd/unbottled.rb @@ -147,7 +147,7 @@ module Homebrew uses_hash = {} all_formulae.each do |f| - deps = f.recursive_dependencies do |_, dep| + deps = Dependency.expand(f, cache_key: "unbottled") do |_, dep| Dependency.prune if dep.optional? end.map(&:to_formula) deps_hash[f.name] = deps