Method: Chef::Knife::SubcommandLoader#site_subcommands
- Defined in:
- lib/chef/knife/core/subcommand_loader.rb
#site_subcommands ⇒ Object
Returns an Array of paths to knife commands located in chef_config_dir/plugins/knife/ and ~/.chef/plugins/knife/
43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/chef/knife/core/subcommand_loader.rb', line 43 def site_subcommands user_specific_files = [] if chef_config_dir user_specific_files.concat Dir.glob(File.("plugins/knife/*.rb", chef_config_dir)) end # finally search ~/.chef/plugins/knife/*.rb user_specific_files.concat Dir.glob(File.join(env['HOME'], '.chef', 'plugins', 'knife', '*.rb')) if env['HOME'] user_specific_files end |