summaryrefslogtreecommitdiff
path: root/lib/leap_cli/commands/pre.rb
blob: f4bf7bbc5cca1107619f48d1d6c12080e9507681 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

#
# check to make sure we can find the root directory of the platform
#
module LeapCli; module Commands

  desc 'Verbosity level 0..5'
  arg_name 'LEVEL'
  default_value '1'
  flag [:v, :verbose]

  desc 'Override default log file.'
  arg_name 'FILE'
  default_value nil
  flag :log

  desc 'Display version number and exit.'
  switch :version, :negatable => false

  desc 'Skip prompts and assume "yes".'
  switch :yes, :negatable => false

  desc 'Like --yes, but also skip prompts that are potentially dangerous to skip.'
  switch :force, :negatable => false

  desc 'Print full stack trace for exceptions and load `debugger` gem if installed.'
  switch [:d, :debug], :negatable => false

  desc 'Disable colors in output.'
  default_value true
  switch 'color', :negatable => true

  pre do |global,command,options,args|
    Bootstrap.setup_global_options(self, global)
    true
  end

end; end