From 3d0b7d14d96422b05670da50e0fa0f25d847d504 Mon Sep 17 00:00:00 2001 From: Mathieu Sauve-Frankel Date: Tue, 5 Jan 2016 09:45:49 +0900 Subject: don't blow up when json object has no recipes fixes loading brand new node objects from json --- lib/chef/node.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/chef/node.rb') diff --git a/lib/chef/node.rb b/lib/chef/node.rb index 0c13e5474a..1b91777f0b 100644 --- a/lib/chef/node.rb +++ b/lib/chef/node.rb @@ -545,7 +545,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 -- cgit v1.2.1