summaryrefslogtreecommitdiff
path: root/lib/chef/knife
diff options
context:
space:
mode:
authorKartik Null Cating-Subramanian <ksubramanian@chef.io>2015-03-17 18:20:41 -0400
committerKartik Null Cating-Subramanian <ksubramanian@chef.io>2015-03-20 11:27:03 -0400
commit8366c821df4a58a0e529f0dbeb3a7a78cefcb707 (patch)
tree09d65bf0fc1352600d01dc820a3ac83b9dcc4a50 /lib/chef/knife
parentd2dd332132fef834a55b7ad21eba6b2312cc5a27 (diff)
downloadchef-8366c821df4a58a0e529f0dbeb3a7a78cefcb707.tar.gz
Deprecate things instead of removing them outright.
Diffstat (limited to 'lib/chef/knife')
-rw-r--r--lib/chef/knife/core/subcommand_loader.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/chef/knife/core/subcommand_loader.rb b/lib/chef/knife/core/subcommand_loader.rb
index ce7ef9deaa..1f59515f44 100644
--- a/lib/chef/knife/core/subcommand_loader.rb
+++ b/lib/chef/knife/core/subcommand_loader.rb
@@ -28,9 +28,15 @@ class Chef
attr_reader :chef_config_dir
attr_reader :env
- def initialize(chef_config_dir)
+ def initialize(chef_config_dir, env=nil)
@chef_config_dir = chef_config_dir
@forced_activate = {}
+
+ # Deprecated and un-used instance variable.
+ @env = env
+ unless env.nil?
+ Chef::Log.deprecation("The env argument to Chef::Knife::SubcommandLoader is deprecated. If you are using env to inject/mock HOME, consider mocking Chef::Util::PathHelper.home instead.")
+ end
end
# Load all the sub-commands