diff options
author | Noah Kantrowitz <noah@coderanger.net> | 2017-04-10 16:58:43 -0700 |
---|---|---|
committer | Noah Kantrowitz <noah@coderanger.net> | 2017-04-10 16:58:43 -0700 |
commit | 2b62d01b854df218ac41e4549f2e7b702c84052b (patch) | |
tree | 0bbd9431e0ab5ac324f4e12fcda27da141fa8a3e /lib/chef/cookbook | |
parent | 3997dbf3efb9850342121497aa27f1964a22b394 (diff) | |
download | chef-2b62d01b854df218ac41e4549f2e7b702c84052b.tar.gz |
Fix https://github.com/chef/chef/issues/6044 by ensuring all segments exist in the manifest.
Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
Diffstat (limited to 'lib/chef/cookbook')
-rw-r--r-- | lib/chef/cookbook/manifest_v0.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/chef/cookbook/manifest_v0.rb b/lib/chef/cookbook/manifest_v0.rb index d818f3072f..400b960dfc 100644 --- a/lib/chef/cookbook/manifest_v0.rb +++ b/lib/chef/cookbook/manifest_v0.rb @@ -54,6 +54,11 @@ class Chef end end end + # Ensure all segments are set to [] if they don't exist. + # See https://github.com/chef/chef/issues/6044 + COOKBOOK_SEGMENTS.each do |segment| + result[segment] ||= [] + end result.merge({ "frozen?" => manifest.frozen_version?, "chef_type" => "cookbook_version" }) end |