From 6a030a5396f9c838b4d4523f43ab2d9e2f502e04 Mon Sep 17 00:00:00 2001 From: Antonio Musolino Date: Tue, 1 Mar 2022 04:37:50 +0100 Subject: fix(runtime): disable console color for non tty stdout (#13782) --- runtime/js/99_main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'runtime/js') diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index fb5de250c..a0f059603 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -574,13 +574,14 @@ delete Object.prototype.__proto__; args, location: locationHref, noColor, + isTty, pid, ppid, unstableFlag, cpuCount, } = runtimeOptions; - colors.setNoColor(noColor); + colors.setNoColor(noColor || !isTty); if (locationHref != null) { location.setLocationHref(locationHref); } @@ -666,12 +667,13 @@ delete Object.prototype.__proto__; unstableFlag, pid, noColor, + isTty, args, location: locationHref, cpuCount, } = runtimeOptions; - colors.setNoColor(noColor); + colors.setNoColor(noColor || !isTty); location.setLocationHref(locationHref); numCpus = cpuCount; registerErrors(); -- cgit v1.2.3