summaryrefslogtreecommitdiff
path: root/lib/leap_cli/commands/pre.rb
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2015-04-27 09:57:35 -0700
committerelijah <elijah@riseup.net>2015-04-27 09:57:35 -0700
commit1c58dd5905bdad68df4f57aa3323d95d8bd2db0a (patch)
treec9e09e6738daf3a59fea23b4c1b99c4ad44a73e8 /lib/leap_cli/commands/pre.rb
parentea5be4ea7b6f0b269ac54655f01c7cd6dc28ece7 (diff)
added --force
Diffstat (limited to 'lib/leap_cli/commands/pre.rb')
-rw-r--r--lib/leap_cli/commands/pre.rb14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/leap_cli/commands/pre.rb b/lib/leap_cli/commands/pre.rb
index 74d7e62..3b316a4 100644
--- a/lib/leap_cli/commands/pre.rb
+++ b/lib/leap_cli/commands/pre.rb
@@ -9,25 +9,31 @@ module LeapCli; module Commands
default_value '1'
flag [:v, :verbose]
- desc 'Override default log file'
+ desc 'Override default log file.'
arg_name 'FILE'
default_value nil
flag :log
- desc 'Display version number and exit'
+ desc 'Display version number and exit.'
switch :version, :negatable => false
- desc 'Skip prompts and assume "yes"'
+ 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'
+ desc 'Disable colors in output.'
default_value true
switch 'color', :negatable => true
pre do |global,command,options,args|
+ if global[:force]
+ global[:yes] = true
+ end
initialize_leap_cli(true, global)
true
end