Method: Chef::Knife.run

Defined in:
lib/chef/knife.rb

.run(args, options = {}) ⇒ Object

Run knife for the given args (ARGV), adding options to the list of CLI options that the subcommand knows how to handle.

Arguments

args:

usually ARGV

options:

A Mixlib::CLI option parser hash. These options are how

subcommands know about global knife CLI options



166
167
168
169
170
171
172
173
174
# File 'lib/chef/knife.rb', line 166

def self.run(args, options={})
  load_commands
  subcommand_class = subcommand_class_from(args)
  subcommand_class.options = options.merge!(subcommand_class.options)
  subcommand_class.load_deps
  instance = subcommand_class.new(args)
  instance.configure_chef
  instance.run_with_pretty_exceptions
end