Class: Chef::Application::Knife

Inherits:
Chef::Application show all
Defined in:
lib/chef/application/knife.rb

Constant Summary collapse

NO_COMMAND_GIVEN =
"You need to pass a sub-command (e.g., knife SUB-COMMAND)\n".freeze

Instance Method Summary collapse

Methods inherited from Chef::Application

#apply_extra_config_options, #auto_log_level?, #check_license_acceptance, #chef_config, #chef_configfetcher, #configure_chef, #configure_encoding, #configure_log_location, #configure_logging, #configure_stdout_logger, debug_stacktrace, #emit_warnings, exit!, fatal!, #initialize, #load_config_file, #logger, logger, normalize_exit_code, #reconfigure, #resolve_log_level, #run_application, #run_chef_client, #set_specific_recipes, #setup_application, #setup_signal_handlers, use_separate_defaults?, #using_output_formatter?, #want_additional_logger?

Constructor Details

This class inherits a constructor from Chef::Application

Instance Method Details

#runObject

Run knife



158
159
160
161
162
163
164
165
# File 'lib/chef/application/knife.rb', line 158

def run
  ChefConfig::PathHelper.per_tool_home_environment = "KNIFE_HOME"
  Mixlib::Log::Formatter.show_time = false
  validate_and_parse_options
  quiet_traps
  Chef::Knife.run(ARGV, options)
  exit 0
end