summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNathan Rajlich <nathan@tootallnate.net>2012-03-27 18:00:59 -0700
committerNathan Rajlich <nathan@tootallnate.net>2012-03-27 18:00:59 -0700
commit208b2307440f95946b232c6a23e2547b7dd94e89 (patch)
treecb454dc92d78856ea50f62299b1d57e514f3359e /src
parenta33d1c959a449115883b42753f5140541561ba2b (diff)
downloadnode-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.js3
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();