summaryrefslogtreecommitdiff
path: root/lib/chef/node.rb
diff options
context:
space:
mode:
authorThom May <thom@may.lt>2016-01-12 18:49:51 +0000
committerThom May <thom@may.lt>2016-01-12 18:49:51 +0000
commitd537eef6d200f79edd22810c2021aef2aa5f8056 (patch)
treeeee48685b6f776f137c130148544c6bbe5e4b180 /lib/chef/node.rb
parenta3344de8596d95352ac5f85f6021ea8c0bddd720 (diff)
parent3d0b7d14d96422b05670da50e0fa0f25d847d504 (diff)
downloadchef-d537eef6d200f79edd22810c2021aef2aa5f8056.tar.gz
Merge pull request #4355 from kisoku/fix_json_create
don't blow up when json object has no recipes
Diffstat (limited to 'lib/chef/node.rb')
-rw-r--r--lib/chef/node.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/node.rb b/lib/chef/node.rb
index f6c7d68f74..cb486f8d09 100644
--- a/lib/chef/node.rb
+++ b/lib/chef/node.rb
@@ -550,7 +550,7 @@ class Chef
if o.has_key?("run_list")
node.run_list.reset!(o["run_list"])
- else
+ elsif o.has_key?("recipes")
o["recipes"].each { |r| node.recipes << r }
end