diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index 5ea924c9c1..3adf6dfc27 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -8,8 +8,16 @@ class Pathname sources.each do |src| case src when Array + if src.empty? + opoo "install was passed an empty array" + return [] + end src.each {|s| results << install_p(s) } when Hash + if src.empty? + opoo "install was passed an empty hash" + return [] + end src.each {|s, new_basename| results << install_p(s, new_basename) } else results << install_p(src)