Class: FlightPlanCli::Commands::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/flight_plan_cli/commands/config.rb

Instance Method Summary collapse

Instance Method Details

#processObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/flight_plan_cli/commands/config.rb', line 4

def process
  # Load config up-front to trigger any errors
  FlightPlanCli.settings.config

  puts '= CONFIG ===='.bold
  puts "Using #{FlightPlanCli.settings.base_config_file}".green
  pretty_print FlightPlanCli.settings.base_config

  puts

  puts '= USER ===='.bold
  user_file = FlightPlanCli.settings.user_config_file

  if user_file
    puts "Using #{user_file}".green
    pretty_print FlightPlanCli.settings.user_config
  else
    puts 'No user config file found'.yellow
  end
end