diff options
-rw-r--r-- | lib/chef/knife/core/subcommand_loader.rb | 2 | ||||
-rw-r--r-- | spec/unit/knife/core/subcommand_loader_spec.rb | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/knife/core/subcommand_loader.rb b/lib/chef/knife/core/subcommand_loader.rb index 2b45d8b9ce..1d359ffd53 100644 --- a/lib/chef/knife/core/subcommand_loader.rb +++ b/lib/chef/knife/core/subcommand_loader.rb @@ -51,7 +51,7 @@ class Chef Chef::Log.debug("Using autogenerated hashed command manifest #{plugin_manifest_path}") Knife::SubcommandLoader::HashedCommandLoader.new(chef_config_dir, plugin_manifest) elsif custom_manifest? - Chef::Log.debug("Using custom manifest #{plugin_manifest_path}") + Chef::Log.deprecation("Using custom manifest #{plugin_manifest_path} is deprecated. Please use a `knife rehash` autogenerated manifest instead.") Knife::SubcommandLoader::CustomManifestLoader.new(chef_config_dir, plugin_manifest) else Knife::SubcommandLoader::GemGlobLoader.new(chef_config_dir) diff --git a/spec/unit/knife/core/subcommand_loader_spec.rb b/spec/unit/knife/core/subcommand_loader_spec.rb index 126a5bd013..2386465c75 100644 --- a/spec/unit/knife/core/subcommand_loader_spec.rb +++ b/spec/unit/knife/core/subcommand_loader_spec.rb @@ -45,6 +45,7 @@ describe Chef::Knife::SubcommandLoader do end it "creates a CustomManifestLoader with then manifest has a key other than _autogenerated_command_paths" do + Chef::Config[:treat_deprecation_warnings_as_errors] = false allow(File).to receive(:read).with(File.join(home, '.chef', 'plugin_manifest.json')).and_return("{ \"plugins\": {}}") expect(Chef::Knife::SubcommandLoader.for_config(config_dir)).to be_a Chef::Knife::SubcommandLoader::CustomManifestLoader end |