diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-16 15:23:58 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-16 15:23:58 -0800 |
commit | d4a4f181c32310043e9279cdf11d37013e89e9ca (patch) | |
tree | e859bf99e3f2b94f164e3d965c1d99f7eb046c7c /lib/chef/cookbook_loader.rb | |
parent | 5959add42e911e14918c41d0212f6ba8e0425d11 (diff) | |
download | chef-d4a4f181c32310043e9279cdf11d37013e89e9ca.tar.gz |
don't warn about shadow cookbooks twice
knife cookbook upload already warns once
Diffstat (limited to 'lib/chef/cookbook_loader.rb')
-rw-r--r-- | lib/chef/cookbook_loader.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/chef/cookbook_loader.rb b/lib/chef/cookbook_loader.rb index c0fd515bf2..6b80fbd662 100644 --- a/lib/chef/cookbook_loader.rb +++ b/lib/chef/cookbook_loader.rb @@ -73,15 +73,23 @@ class Chef end end - def load_cookbooks + # Will be removed when cookbook shadowing is removed, do NOT create new consumers of this API. + # + # @api private + def load_cookbooks_without_shadow_warning preload_cookbooks @loaders_by_name.each do |cookbook_name, _loaders| load_cookbook(cookbook_name) end - warn_about_cookbook_shadowing @cookbooks_by_name end + def load_cookbooks + ret = load_cookbooks_without_shadow_warning + warn_about_cookbook_shadowing + ret + end + def load_cookbook(cookbook_name) preload_cookbooks |