aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula.rb
diff options
context:
space:
mode:
authorJack Nagel2012-08-14 21:45:08 -0500
committerJack Nagel2012-08-14 22:35:28 -0500
commit53cf970312fb98d53fa5859bc039e453b60274cc (patch)
tree9d1f635516774bcdd6f9bb476588cd132ae383ee /Library/Homebrew/formula.rb
parent120ce10730acfeb458801fcc24042ed34c463251 (diff)
downloadbrew-53cf970312fb98d53fa5859bc039e453b60274cc.tar.bz2
build: expand requirements recursively when modifying ENV
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew/formula.rb')
-rw-r--r--Library/Homebrew/formula.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 2f4562449..bf7c4f335 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -440,6 +440,12 @@ class Formula
end
end
+ def recursive_requirements
+ reqs = recursive_deps.map { |dep| dep.requirements }.to_set
+ reqs << requirements
+ reqs.flatten
+ end
+
protected
# Pretty titles the command and buffers stdout/stderr