File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 11import * as tty from "tty"
22
3- const proc = typeof process === "undefined" ? { } : process
4-
5- const env = proc . env || { }
6- const argv = proc . argv || [ ]
3+ const { env, argv, platform } = typeof process === "undefined" ? { } : process
74
85const isDisabled = "NO_COLOR" in env || argv . includes ( "--no-color" )
96const isForced = "FORCE_COLOR" in env || argv . includes ( "--color" )
10- const isWindows = proc . platform === "win32"
7+ const isWindows = platform === "win32"
118const isDumbTerminal = env . TERM === "dumb"
129
1310const isCompatibleTerminal =
@@ -18,7 +15,8 @@ const isCI =
1815 ( "GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env )
1916
2017export const isColorSupported =
21- ! isDisabled && ( isForced || ( isWindows && ! isDumbTerminal ) || isCompatibleTerminal || isCI )
18+ ! isDisabled &&
19+ ( isForced || ( isWindows && ! isDumbTerminal ) || isCompatibleTerminal || isCI )
2220
2321const replaceClose = (
2422 index ,
You can’t perform that action at this time.
0 commit comments