summaryrefslogtreecommitdiff
path: root/lib/chef/knife/core/subcommand_loader.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/knife/core/subcommand_loader.rb')
-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..6f28f80278 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. Please file an issue at https://github.com/chef/chef/issues if you're using it. If you are using env to inject/mock HOME, consider mocking Chef::Util::PathHelper.home instead.")
+ end
end
# Load all the sub-commands