aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAlyssa Ross2016-12-23 20:56:39 +0000
committerAlyssa Ross2016-12-23 21:31:20 +0000
commitef5cff5e7196b7371239d1028a0f07cd8af980b9 (patch)
treec9f13372f4e59d45cb8dfc4617507e79d6cfca6a /Library
parent43f2e9e7bbb5917b14af81fd226d763dae388cdb (diff)
downloadbrew-ef5cff5e7196b7371239d1028a0f07cd8af980b9.tar.bz2
formula: make runtime_dependencies logic clearer
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