Skip to content

Commit 9d5dea9

Browse files
Thom MaySeth Falcon
authored andcommitted
Fix bug where we'd explode if we encountered non-recipe items on the run list
1 parent f560b3d commit 9d5dea9

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

chef-server-api/app/controllers/nodes.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,7 @@ def cookbooks_for_node(all_cookbooks)
157157
items = @node.run_list.expand('couchdb').run_list_items
158158

159159
# walk run list and accumulate included dependencies
160-
items.inject({}) do |included_cookbooks, rli|
161-
next unless rli.recipe?
160+
items.select{|i| i.recipe?}.inject({}) do |included_cookbooks, rli|
162161
expand_cookbook_deps(included_cookbooks, all_cookbooks, rli)
163162
included_cookbooks
164163
end

0 commit comments

Comments
 (0)