diff --git a/lib/repl.js b/lib/repl.js index 434ff66baeb..33794776727 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -105,7 +105,7 @@ function REPLServer(prompt, stream) { this.commands = {}; defineDefaultCommands(this); - if (rli.enabled && !disableColors) { + if (rli.enabled && !disableColors && exports.writer === util.inspect) { // Turn on ANSI coloring. exports.writer = function(obj, showHidden, depth) { return util.inspect(obj, showHidden, depth, true);