From 2fc643421f4a8df1513df2345b2cc39567021828 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 19 May 2020 09:34:50 +0100 Subject: [PATCH] formula_installer: fix test dependencies. Only prune test dependencies from the tree when they aren't also build dependencies (and vice-versa with build dependencies) and the include test argument hasn't been passed. --- Library/Homebrew/formula_installer.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index c2f07c73e2..20917292fc 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -488,9 +488,9 @@ class FormulaInstaller if dep.prune_from_option?(build) Dependency.prune - elsif include_test? && dep.test? && !dep.installed? - Dependency.keep_but_prune_recursive_deps - elsif dep.build? && install_bottle_for?(dependent, build) + elsif dep.test? && !dep.build? && !include_test? + Dependency.prune + elsif dep.build? && !dep.test? && install_bottle_for?(dependent, build) Dependency.prune elsif dep.prune_if_build_and_not_dependent?(dependent) Dependency.prune