Module: AptControl::CLI

Defined in:
lib/apt_control/cli.rb,
lib/apt_control/cli/set.rb,
lib/apt_control/cli/watch.rb,
lib/apt_control/cli/status.rb,
lib/apt_control/cli/include.rb,
lib/apt_control/cli/promote.rb

Defined Under Namespace

Modules: Common Classes: Include, Promote, Root, Set, Status, Watch

Class Method Summary collapse

Class Method Details

.init_commandsObject



35
36
37
38
39
40
41
# File 'lib/apt_control/cli.rb', line 35

def self.init_commands
  require 'apt_control/cli/status'
  require 'apt_control/cli/watch'
  require 'apt_control/cli/include'
  require 'apt_control/cli/set'
  require 'apt_control/cli/promote'
end

.mainObject



21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/apt_control/cli.rb', line 21

def self.main
  init_commands

  Climate.with_standard_exception_handling do
    begin
      Root.run(ARGV)
    rescue Exec::UnexpectedExitStatus => e
      $stderr.puts("Error executing: #{e.command}")
      $stderr.puts(e.stderr)
      exit 1
    end
  end
end