From 1b7d9d65f42e77fdceb11b0b0b9ab9a63f6762e9 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Thu, 7 Sep 2017 15:47:36 +0100 Subject: [PATCH] Only use colour output if we're on a terminal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit And not if we’re running on AWS Lambda, for instance --- core/modules/utils/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/utils/utils.js b/core/modules/utils/utils.js index e276defbd..e2050b6f6 100644 --- a/core/modules/utils/utils.js +++ b/core/modules/utils/utils.js @@ -20,7 +20,7 @@ exports.log = function(text,colour) { }; exports.terminalColour = function(colour) { - if($tw.node) { + if($tw.node && process.stdout.isTTY) { if(colour) { var code = exports.terminalColourLookup[colour]; if(code) {