1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-24 17:10:29 +00:00

Only use colour output if we're on a terminal

And not if we’re running on AWS Lambda, for instance
This commit is contained in:
Jermolene 2017-09-07 15:47:36 +01:00
parent 5a5d648127
commit 1b7d9d65f4

View File

@ -20,7 +20,7 @@ exports.log = function(text,colour) {
}; };
exports.terminalColour = function(colour) { exports.terminalColour = function(colour) {
if($tw.node) { if($tw.node && process.stdout.isTTY) {
if(colour) { if(colour) {
var code = exports.terminalColourLookup[colour]; var code = exports.terminalColourLookup[colour];
if(code) { if(code) {