mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-25 01:20:30 +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:
parent
5a5d648127
commit
1b7d9d65f4
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user