summaryrefslogtreecommitdiff
path: root/lib/leap_cli/commands/pre.rb
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2014-03-08 12:52:36 -0800
committerelijah <elijah@riseup.net>2014-03-08 12:52:36 -0800
commit3c0ce709ac6321a90f6daababb9b053b3e0cb756 (patch)
tree1e554e1d727302d81e3d358c725517045cab7f8c /lib/leap_cli/commands/pre.rb
parent16c6cbae4f155c6f8c626fc69cca41ebee1a9e05 (diff)
added --no-color flag
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