diff --git a/index.js b/index.js index fb4b3a9..1da5e6a 100644 --- a/index.js +++ b/index.js @@ -6,16 +6,17 @@ const argv = process.argv || [] const isDisabled = "NO_COLOR" in env || argv.includes("--no-color") const isForced = "FORCE_COLOR" in env || argv.includes("--color") const isWindows = process.platform === "win32" +const isDumbTerminal = env.TERM === "dumb" const isCompatibleTerminal = - tty && tty.isatty && tty.isatty(1) && env.TERM && env.TERM !== "dumb" + tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal const isCI = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env) export const isColorSupported = - !isDisabled && (isForced || isWindows || isCompatibleTerminal || isCI) + !isDisabled && (isForced || (isWindows && !isDumbTerminal) || isCompatibleTerminal || isCI) const replaceClose = ( index,