summaryrefslogtreecommitdiff
path: root/lib/chef/cookbook_version.rb
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2018-05-16 15:29:08 +0100
committerThom May <thom@chef.io>2018-05-16 15:29:08 +0100
commit098ebb3c7ad9fa5ebbfdb7288241baccb9dae039 (patch)
treee965777325d24496e03045fd33d8f2dd4d8ec9ff /lib/chef/cookbook_version.rb
parent3a6e55ba3226f41181c53a6725544af42d4525c4 (diff)
downloadchef-098ebb3c7ad9fa5ebbfdb7288241baccb9dae039.tar.gz
Fix manifest entries for root filestm/fix_manifest_root_files
We weren't consistently naming root files; in some places in the spec the names contained the `root_files` segment and in other places they didn't. This now always uses `root_files`. Signed-off-by: Thom May <thom@chef.io>
Diffstat (limited to 'lib/chef/cookbook_version.rb')
-rw-r--r--lib/chef/cookbook_version.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/cookbook_version.rb b/lib/chef/cookbook_version.rb
index 7bb3f3385f..01843c0093 100644
--- a/lib/chef/cookbook_version.rb
+++ b/lib/chef/cookbook_version.rb
@@ -131,7 +131,7 @@ class Chef
def attribute_filenames_by_short_filename
@attribute_filenames_by_short_filename ||= begin
name_map = filenames_by_name(files_for("attributes"))
- root_alias = cookbook_manifest.root_files.find { |record| record[:name] == "attributes.rb" }
+ root_alias = cookbook_manifest.root_files.find { |record| record[:name] == "root_files/attributes.rb" }
name_map["default"] = root_alias[:full_path] if root_alias
name_map
end
@@ -140,7 +140,7 @@ class Chef
def recipe_filenames_by_name
@recipe_filenames_by_name ||= begin
name_map = filenames_by_name(files_for("recipes"))
- root_alias = cookbook_manifest.root_files.find { |record| record[:name] == "recipe.rb" }
+ root_alias = cookbook_manifest.root_files.find { |record| record[:name] == "root_files/recipe.rb" }
if root_alias
Chef::Log.error("Cookbook #{name} contains both recipe.rb and and recipes/default.rb, ignoring recipes/default.rb") if name_map["default"]
name_map["default"] = root_alias[:full_path]