Skip to content

Commit

Permalink
fetch: only fetch runtime deps with HOMEBREW_INSTALL_FROM_API
Browse files Browse the repository at this point in the history
  • Loading branch information
Rylan12 committed Apr 7, 2022
1 parent f5696ef commit dda9f75
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Library/Homebrew/cmd/fetch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,15 @@ def fetch
when Formula
f = formula_or_cask

[f, *f.recursive_dependencies.map(&:to_formula)]
deps = if Homebrew::EnvConfig.install_from_api?
f.recursive_dependencies do |_, dependency|
Dependency.prune if EnvConfig.install_from_api? && (dependency.build? || dependency.test?)
end
else
f.recursive_dependencies
end

[f, *deps.map(&:to_formula)]
else
formula_or_cask
end
Expand Down

0 comments on commit dda9f75

Please sign in to comment.