Skip to content

Commit

Permalink
Merge pull request #719 from carlocab/revert-prune
Browse files Browse the repository at this point in the history
Revert "formulae_dependents: prune build deps when linking test deps"
  • Loading branch information
carlocab authored Nov 18, 2021
2 parents deedd30 + 592b76f commit e604a50
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/tests/formulae_dependents.rb
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,14 @@ def install_dependent(dependent, testable_dependents, args:, build_from_source:
if testable_dependents.include? dependent
test "brew", "install", "--only-dependencies", "--include-test", dependent.full_name

dependent.recursive_dependencies do |_, dependency|
Dependency.prune if dependency.build? && !dependency.test?
dependent.recursive_dependencies.each do |dependency|
next if dependency.build? && !dependency.test?

dependency_f = dependency.to_formula
Dependency.skip if dependency_f.keg_only?
Dependency.skip if dependency_f.linked_keg.exist?
# We don't want to attempt to link runtime deps of build deps.
next unless dependency_f.any_version_installed?
next if dependency_f.keg_only?
next if dependency_f.linked_keg.exist?

unlink_conflicts dependency_f
test "brew", "link", dependency_f.full_name
Expand Down

0 comments on commit e604a50

Please sign in to comment.