summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2020-01-24 14:34:14 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2020-01-24 14:34:14 -0800
commit17eb7685ab7384357a2643145d97e3ca4af83cb4 (patch)
tree1989712a1ad90dedfa618e285ff8f7c448f181e6 /lib
parentde17ae1bcad91aadb1731a37b36d49def11dd052 (diff)
downloadchef-17eb7685ab7384357a2643145d97e3ca4af83cb4.tar.gz
switch the load method back to not raising + deprecationlcg/tweak-cbv
use a proper deprecation instead of a warning and don't raise in the load method. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/cookbook/cookbook_version_loader.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/cookbook/cookbook_version_loader.rb b/lib/chef/cookbook/cookbook_version_loader.rb
index cf7bff1ff8..2c4fe6db41 100644
--- a/lib/chef/cookbook/cookbook_version_loader.rb
+++ b/lib/chef/cookbook/cookbook_version_loader.rb
@@ -82,7 +82,7 @@ class Chef
end
def load
- Chef::Log.warn "Chef::Cookbook::CookbookVersionLoader's load method is deprecated. Please use load! instead."
+ Chef.deprecated(:internal_api, "Chef::Cookbook::CookbookVersionLoader's load method is deprecated. Please use load! instead.")
metadata # force lazy evaluation to occur
# re-raise any exception that occurred when reading the metadata
@@ -93,7 +93,7 @@ class Chef
remove_ignored_files
if empty?
- raise Exceptions::CookbookNotFoundInRepo, "The directory #{cookbook_path} does not contain a cookbook"
+ Chef::Log.warn "Found a directory #{cookbook_name} in the cookbook path, but it contains no cookbook files. skipping."
end
cookbook_settings