formula_installer: don't always install test deps.

Fixes #6470.
This commit is contained in:
Steven Peters 2019-09-18 15:14:11 -07:00
parent 605a9c6057
commit 13647388c1

View File

@ -483,8 +483,12 @@ class FormulaInstaller
if dep.prune_from_option?(build)
Dependency.prune
elsif include_test? && dep.test? && !dep.installed?
elsif dep.test?
if !include_test?
Dependency.prune
elsif !dep.installed?
Dependency.keep_but_prune_recursive_deps
end
elsif dep.build? && install_bottle_for?(dependent, build)
Dependency.prune
elsif dep.prune_if_build_and_not_dependent?(dependent)