From 7fb331328e58512f217e13917509f22b4e0ee507 Mon Sep 17 00:00:00 2001 From: "Alexey Ten (Lynn)" Date: Tue, 3 Sep 2024 12:02:47 +0200 Subject: [PATCH] Use `stdout.isTTY`, avoid `tty`. Fixes #67 Yet another try to fix #67 --- picocolors.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/picocolors.js b/picocolors.js index f5ea2a1..340e7bd 100644 --- a/picocolors.js +++ b/picocolors.js @@ -5,7 +5,7 @@ let isColorSupported = ("FORCE_COLOR" in env || argv.includes("--color") || process.platform === "win32" || - (require != null && require("tty").isatty(1) && env.TERM !== "dumb") || + (process.stdout && process.stdout.isTTY && env.TERM !== "dumb") || "CI" in env) let formatter =