diff options
author | Mathieu Sauve-Frankel <msf@fastly.com> | 2016-01-05 09:45:49 +0900 |
---|---|---|
committer | Mathieu Sauve-Frankel <msf@fastly.com> | 2016-01-08 12:10:18 +0900 |
commit | 3d0b7d14d96422b05670da50e0fa0f25d847d504 (patch) | |
tree | 37a9b78f9600d2c61b827494ab2d7e822b761b93 /lib/chef | |
parent | c9d7e017de225db3e8b8610dc7e2f41242dbe730 (diff) | |
download | chef-3d0b7d14d96422b05670da50e0fa0f25d847d504.tar.gz |
don't blow up when json object has no recipes
fixes loading brand new node objects from json
Diffstat (limited to 'lib/chef')
-rw-r--r-- | lib/chef/node.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |