aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/pathname.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb
index 5ea924c9c..3adf6dfc2 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)