Class: Kitchen::Command::Doctor
- Defined in:
- lib/kitchen/command/doctor.rb
Overview
Check for common system or configuration problems.
Instance Method Summary collapse
-
#call ⇒ Object
Invoke the command.
Methods inherited from Base
Methods included from Logging
#banner, #debug, #error, #fatal, #info, #warn
Constructor Details
This class inherits a constructor from Kitchen::Command::Base
Instance Method Details
#call ⇒ Object
Invoke the command.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/kitchen/command/doctor.rb', line 23 def call results = parse_subcommand(args.first) if results.empty? error("No instances configured, cannot check configuration. Please check your .kitchen.yml and confirm it has platform and suites sections.") exit(1) end # By default only doctor the first instance to avoid output spam. results = [results.first] unless [:all] failed = results.any? do |instance| debug "Doctor on #{instance.name}." instance.doctor_action end exit(1) if failed end |