diff options
-rw-r--r-- | lib/chef/cookbook_loader.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/chef/cookbook_loader.rb b/lib/chef/cookbook_loader.rb index 9bab6f01ce..977c65211a 100644 --- a/lib/chef/cookbook_loader.rb +++ b/lib/chef/cookbook_loader.rb @@ -66,11 +66,19 @@ class Chef merged_cookbook_paths end + def warn_about_cookbook_shadowing + unless merged_cookbooks.empty? + Chef::Log.deprecation "The cookbooks: #{merged_cookbooks.join(', ')} exist in multiple places in your cookbook_path. " + + "A composite version has been compiled. In a future version of Chef this behavior will be removed." + end + end + def load_cookbooks preload_cookbooks @loaders_by_name.each do |cookbook_name, _loaders| load_cookbook(cookbook_name) end + warn_about_cookbook_shadowing @cookbooks_by_name end |