aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 457821685..bc1dbd970 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -1507,9 +1507,7 @@ class Formula
def runtime_dependencies
recursive_dependencies do |_dependent, dependency|
Dependency.prune if dependency.build?
- if dependency.optional? || dependency.recommended?
- Dependency.prune unless build.with?(dependency)
- end
+ Dependency.prune if !dependency.required? && build.without?(dependency)
end
end