diff options
author | Nathan Rajlich <nathan@tootallnate.net> | 2012-03-27 18:00:59 -0700 |
---|---|---|
committer | Nathan Rajlich <nathan@tootallnate.net> | 2012-03-27 18:00:59 -0700 |
commit | 208b2307440f95946b232c6a23e2547b7dd94e89 (patch) | |
tree | cb454dc92d78856ea50f62299b1d57e514f3359e /src | |
parent | a33d1c959a449115883b42753f5140541561ba2b (diff) | |
download | node-208b2307440f95946b232c6a23e2547b7dd94e89.tar.gz |
repl: add a 'useColors' option to the repl
This should only be minimally used, since the `terminal` value will usually be
what you are expecting. This option is specifically for the case where `terminal`
is false, but you still want colors to be output (or vice-versa).
Diffstat (limited to 'src')
-rw-r--r-- | src/node.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/node.js b/src/node.js index 3229416df..ade49aa1f 100644 --- a/src/node.js +++ b/src/node.js @@ -107,6 +107,9 @@ if (parseInt(process.env['NODE_NO_READLINE'], 10)) { opts.terminal = false; } + if (parseInt(process.env['NODE_DISABLE_COLORS'], 10)) { + opts.useColors = false; + } var repl = Module.requireRepl().start(opts); repl.on('exit', function() { process.exit(); |