aboutsummaryrefslogtreecommitdiff
path: root/lib/leap_cli/commands/pre.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/leap_cli/commands/pre.rb')
-rw-r--r--lib/leap_cli/commands/pre.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/leap_cli/commands/pre.rb b/lib/leap_cli/commands/pre.rb
index 318282d..4b62b5b 100644
--- a/lib/leap_cli/commands/pre.rb
+++ b/lib/leap_cli/commands/pre.rb
@@ -23,6 +23,10 @@ module LeapCli; module Commands
desc 'Enable debugging library (leap_cli development only)'
switch :debug, :negatable => false
+ desc 'Disable colors in output'
+ default_value true
+ switch 'color', :negatable => true
+
pre do |global,command,options,args|
#
# set verbosity
@@ -62,6 +66,7 @@ module LeapCli; module Commands
LeapCli.log_file = global[:log] || LeapCli.leapfile.log
LeapCli::Util.log_raw(:log) { $0 + ' ' + ORIGINAL_ARGV.join(' ')}
log_version
+ LeapCli.log_in_color = global[:color]
#
# load all the nodes everything