From ee73c30aa59c92e8d3f98eb60ad2f0d8caa39970 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Fri, 16 Mar 2012 21:31:18 +0000 Subject: [PATCH] Tap more than one formula from taps other than alt Whoops. --- Library/Homebrew/extend/pathname.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index 8465408fed..1ccbff51cf 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -339,10 +339,12 @@ class Pathname end [self/:Formula, self/:HomebrewFormula, self].each do |d| - d.children.map{ |child| child.relative_path_from(self) }.each do |pn| - yield pn if pn.to_s =~ /.rb$/ + if d.exist? + d.children.map{ |child| child.relative_path_from(self) }.each do |pn| + yield pn if pn.to_s =~ /.rb$/ + end break - end if d.exist? + end end end end