class ChefCLI::CLI
def run(enforce_license: false)
def run(enforce_license: false) path_check! subcommand_name, *subcommand_params = argv # # Runs the appropriate subcommand if the given parameters contain any # subcommands. # if subcommand_name.nil? || option?(subcommand_name) handle_options elsif have_command?(subcommand_name) subcommand = instantiate_subcommand(subcommand_name) exit_code = subcommand.run_with_default_options(enforce_license, subcommand_params) exit normalized_exit_code(exit_code) else err "Unknown command `#{subcommand_name}'." show_help exit 1 end rescue OptionParser::InvalidOption => e err(e.message) show_help exit 1 end