From fcd62ce1eb8ac4ed775515f7e877946a62508d65 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Thu, 10 Sep 2009 14:11:04 +0100 Subject: Don't install dependencies that are already installed --- Library/Homebrew/brew.h.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Library') diff --git a/Library/Homebrew/brew.h.rb b/Library/Homebrew/brew.h.rb index 496e7afc0..de5048cc3 100644 --- a/Library/Homebrew/brew.h.rb +++ b/Library/Homebrew/brew.h.rb @@ -155,7 +155,7 @@ def expand_deps fae f.deps.each do |name| f = Formula.factory name deps << expand_deps(f) if f.deps # hideous inefficient - deps << f + deps << f unless f.installed? end when Hash # TODO implement optional and recommended @@ -166,6 +166,7 @@ def expand_deps fae end deps << f end + # TODO much more efficient to use a set and not recurse stuff already done return deps.flatten.uniq end -- cgit v1.2.3