diff options
author | Tim Smith <tsmith@chef.io> | 2020-02-06 17:21:55 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-06 17:21:55 -0800 |
commit | 37b22e0524d4aac76e4dcead98bf6778079b58ca (patch) | |
tree | 6166033be83f399ef4289ac574f84748e09789aa /lib/chef/knife/config_use_profile.rb | |
parent | d923776da3a886c61ac6360bd968a3bc82dbb68f (diff) | |
parent | 8ab22a0878761e51a7d2c74d2cd0eb289e9affb6 (diff) | |
download | chef-37b22e0524d4aac76e4dcead98bf6778079b58ca.tar.gz |
Merge pull request #9351 from chef/knife_15
Lazy load as many knife deps as possible
Diffstat (limited to 'lib/chef/knife/config_use_profile.rb')
-rw-r--r-- | lib/chef/knife/config_use_profile.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/chef/knife/config_use_profile.rb b/lib/chef/knife/config_use_profile.rb index 89d75b3369..134ae5e8b6 100644 --- a/lib/chef/knife/config_use_profile.rb +++ b/lib/chef/knife/config_use_profile.rb @@ -15,8 +15,6 @@ # limitations under the License. # -require "fileutils" unless defined?(FileUtils) - require_relative "../knife" class Chef @@ -24,6 +22,10 @@ class Chef class ConfigUseProfile < Knife banner "knife config use-profile PROFILE" + deps do + require "fileutils" unless defined?(FileUtils) + end + # Disable normal config loading since this shouldn't fail if the profile # doesn't exist of the config is otherwise corrupted. def configure_chef |