aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorAdam Vandenberg2012-03-16 22:00:59 -0700
committerAdam Vandenberg2012-03-16 22:00:59 -0700
commita75d9d51d0262860aeefcc8e932dbf047275f29b (patch)
treeac73f6e15f1f37e1bf2633c7dcf9b55e4569e9c2 /Library/Homebrew/cmd
parent9905512af6f4daaad105792423c33f5de69ddc39 (diff)
downloadhomebrew-a75d9d51d0262860aeefcc8e932dbf047275f29b.tar.bz2
Add `brew uses --recursive`
Closes #8870.
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/uses.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/uses.rb b/Library/Homebrew/cmd/uses.rb
index 63bfb09f9..6c5886a8c 100644
--- a/Library/Homebrew/cmd/uses.rb
+++ b/Library/Homebrew/cmd/uses.rb
@@ -11,9 +11,11 @@ module Homebrew extend self
uses = Formula.all.select do |f|
ARGV.formulae.all? do |ff|
- # For each formula given, show which other formulas depend on it.
- # We only go one level up, ie. direct dependencies.
- f.deps.include? ff.name
+ if ARGV.flag? '--recursive'
+ f.recursive_deps.include? ff
+ else
+ f.deps.include? ff.name
+ end
end
end