summaryrefslogtreecommitdiff
path: root/runtime/js
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/js')
-rw-r--r--runtime/js/99_main.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js
index 06a7d605d..76a279bbd 100644
--- a/runtime/js/99_main.js
+++ b/runtime/js/99_main.js
@@ -241,7 +241,7 @@ function opMainModule() {
const opArgs = memoizeLazy(() => ops.op_bootstrap_args());
const opPid = memoizeLazy(() => ops.op_bootstrap_pid());
const opPpid = memoizeLazy(() => ops.op_ppid());
-setNoColorFn(() => ops.op_bootstrap_no_color());
+setNoColorFn(() => ops.op_bootstrap_no_color() || !ops.op_bootstrap_is_tty());
function formatException(error) {
if (ObjectPrototypeIsPrototypeOf(ErrorPrototype, error)) {
@@ -530,7 +530,7 @@ function bootstrapMainRuntime(runtimeOptions) {
ObjectDefineProperties(finalDenoNs, {
pid: util.getterOnly(opPid),
ppid: util.getterOnly(opPpid),
- noColor: util.getterOnly(getNoColor),
+ noColor: util.getterOnly(() => ops.op_bootstrap_no_color()),
args: util.getterOnly(opArgs),
mainModule: util.getterOnly(opMainModule),
});
@@ -666,7 +666,7 @@ function bootstrapWorkerRuntime(
}
ObjectDefineProperties(finalDenoNs, {
pid: util.getterOnly(opPid),
- noColor: util.getterOnly(getNoColor),
+ noColor: util.getterOnly(() => ops.op_bootstrap_no_color()),
args: util.getterOnly(opArgs),
});
// Setup `Deno` global - we're actually overriding already