diff options
-rw-r--r-- | lib/chef/knife/cookbook_create.rb | 4 | ||||
-rw-r--r-- | spec/unit/knife/cookbook_create_spec.rb | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/chef/knife/cookbook_create.rb b/lib/chef/knife/cookbook_create.rb index 950de380f8..ccb78bb7a6 100644 --- a/lib/chef/knife/cookbook_create.rb +++ b/lib/chef/knife/cookbook_create.rb @@ -56,6 +56,10 @@ class Chef :description => "Email address of cookbook maintainer" def run + Chef::Log.deprecation <<EOF +This command is being deprecated in favor of `chef generate cookbook` and will soon return an error. +Please use `chef generate cookbook` instead of this command. +EOF self.config = Chef::Config.merge!(config) if @name_args.length < 1 show_usage diff --git a/spec/unit/knife/cookbook_create_spec.rb b/spec/unit/knife/cookbook_create_spec.rb index 5e343f3db1..f860a8bce8 100644 --- a/spec/unit/knife/cookbook_create_spec.rb +++ b/spec/unit/knife/cookbook_create_spec.rb @@ -22,6 +22,7 @@ require "tmpdir" describe Chef::Knife::CookbookCreate do before(:each) do Chef::Config[:node_name] = "webmonkey.example.com" + Chef::Config[:treat_deprecation_warnings_as_errors] = false @knife = Chef::Knife::CookbookCreate.new @knife.config = {} @knife.name_args = ["foobar"] |