Class: AptControl::CLI::Set

Inherits:
Object
  • Object
show all
Includes:
Common
Defined in:
lib/apt_control/cli/set.rb

Instance Method Summary collapse

Methods included from Common

#apt_site, #build_archive, #control_file, #each_package_state, #fs_listener_factory, #jabber, #jabber_enabled?, #logger, #new_include_cmd, #notify, #package_states, #validate_config!

Instance Method Details

#runObject



11
12
13
14
15
16
17
18
19
20
# File 'lib/apt_control/cli/set.rb', line 11

def run
  validate_config!

  begin
    AptControl::Commands::Set.new(control_file: control_file).
      run(arguments[:distribution], arguments[:package], arguments[:constraint])
  rescue ArgumentError => e
    raise Climate::ExitException, e.message
  end
end