Class: ForemanMaintain::Cli::MainCommand

Inherits:
Base
  • Object
show all
Includes:
ForemanMaintain::Concerns::Logger
Defined in:
lib/foreman_maintain/cli.rb

Instance Attribute Summary

Attributes inherited from Base

#runner

Instance Method Summary collapse

Methods included from ForemanMaintain::Concerns::Logger

#logger

Methods inherited from Base

#available_checks, #available_procedures, available_tags, #available_tags, completion_map, completion_types, dashize, #dashize, delete_duplicate_assumeyes_if_any, interactive_option, label_option, #label_string, option, #option_wrapper, parameter, #print_check_info, #reporter, #run_scenario, #run_scenarios_and_exit, service_options, subcommand, #tag_string, tags_option, #underscorize

Methods included from ForemanMaintain::Concerns::Finders

#check, #detector, #feature, #find_all_scenarios, #find_checks, #find_procedures, #find_scenarios, #procedure

Instance Method Details

#run(*arguments) ⇒ Object



35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/foreman_maintain/cli.rb', line 35

def run(*arguments)
  logger.info("Running foreman-maintain command with arguments #{arguments.inspect}")
  begin
    super
    @exit_code = 0
  rescue Error::UsageError => e
    process_usage_error(e)
  rescue StandardError => e
    process_standard_error(e)
  end

  return @exit_code
end