|
7 | 7 | */
|
8 | 8 |
|
9 | 9 | var fs = require('fs'),
|
10 |
| - util = require('util'), |
11 | 10 | path = require('path'),
|
12 |
| - flatiron = require('flatiron'), |
| 11 | + util = require('util'), |
| 12 | + colors = require('colors'), |
13 | 13 | cliff = require('cliff'),
|
| 14 | + flatiron = require('flatiron'), |
14 | 15 | forever = require('../forever');
|
15 | 16 |
|
16 | 17 | var cli = exports;
|
@@ -51,6 +52,8 @@ var help = [
|
51 | 52 | ' --sourceDir The source directory for which SCRIPT is relative to',
|
52 | 53 | ' --minUptime Minimum uptime (millis) for a script to not be considered "spinning"',
|
53 | 54 | ' --spinSleepTime Time to wait (millis) between launches of a spinning script.',
|
| 55 | + ' --colors --no-colors will disable output coloring', |
| 56 | + ' --plain alias of --no-colors', |
54 | 57 | ' --plain Disable command line colors',
|
55 | 58 | ' -d, --debug Forces forever to log debug output',
|
56 | 59 | ' -v, --verbose Turns on the verbose messages from Forever',
|
@@ -523,6 +526,13 @@ cli.run = function () {
|
523 | 526 | };
|
524 | 527 |
|
525 | 528 | cli.start = function () {
|
| 529 | + // |
| 530 | + // Check for --no-colors/--colors and --plain option |
| 531 | + // |
| 532 | + if ((typeof app.argv.colors !== 'undefined' && !app.argv.colors) || app.argv.plain) { |
| 533 | + colors.mode = 'none'; |
| 534 | + } |
| 535 | + |
526 | 536 | if (app.config.get('help')) {
|
527 | 537 | return util.puts(help.join('\n'));
|
528 | 538 | }
|
|
0 commit comments