Skip to content
Browse files

Don't add empty strings to the cookbook dependency list

  • Loading branch information...
1 parent 764e0bb commit d6ed9fa6f9f7b2dc3d3a45e1783a4ed362714bff @cgriego committed Jun 13, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/spiceweasel/cookbook_list.rb
View
5 lib/spiceweasel/cookbook_list.rb
@@ -67,13 +67,12 @@ def validateMetadata(cookbook,version)
deps.each do |dependency|
STDOUT.puts "DEBUG: cookbook #{cookbook} metadata dependency: #{dependency}" if DEBUG
line = dependency.split()
- cbdep = ''
if line[1] =~ /^"/ #ignore variables and versions
cbdep = line[1].gsub(/"/,'')
cbdep.gsub!(/\,/,'') if cbdep.end_with?(',')
+ STDOUT.puts "DEBUG: cookbook #{cookbook} metadata depends: #{cbdep}" if DEBUG
+ @dependencies << cbdep
end
- STDOUT.puts "DEBUG: cookbook #{cookbook} metadata depends: #{cbdep}" if DEBUG
- @dependencies << cbdep
end
return @cookbook
end

0 comments on commit d6ed9fa

Please sign in to comment.
Something went wrong with that request. Please try again.