From 3265bfbd68f2732bfb107004cdf878ce205a30b8 Mon Sep 17 00:00:00 2001 From: Jorge Bucaran Date: Wed, 22 Sep 2021 02:55:11 +0900 Subject: [PATCH] Make sure tty exists too --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 2a6e89d..9e1a05f 100644 --- a/index.js +++ b/index.js @@ -6,7 +6,7 @@ const isForced = "FORCE_COLOR" in env const isWindows = platform === "win32" const isCompatibleTerminal = - tty.isatty && tty.isatty(1) && env.TERM && env.TERM !== "dumb" + tty && tty.isatty && tty.isatty(1) && env.TERM && env.TERM !== "dumb" const isCI = "CI" in env &&