diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2020-01-24 14:34:14 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2020-01-27 11:32:13 -0800 |
commit | 32d0a00b3f6324fbc616617ba9da67f41d3f081c (patch) | |
tree | 318d83b688a7f95a02b6b85fd9c33f62ea5f7309 | |
parent | 07a2e4973c947c83e61f942039e062e1b763a94a (diff) | |
download | chef-32d0a00b3f6324fbc616617ba9da67f41d3f081c.tar.gz |
switch the load method back to not raising + deprecation
use a proper deprecation instead of a warning and don't raise
in the load method.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r-- | lib/chef/cookbook/cookbook_version_loader.rb | 4 |
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 |