FORCE_COLOR=[1, 2, 3]
FORCE_COLOR
环境变量用于启用 ANSI 彩色输出。值可能是:
¥The FORCE_COLOR
environment variable is used to
enable ANSI colorized output. The value may be:
-
1
、true
、或空字符串''
表示支持 16 色,¥
1
,true
, or the empty string''
indicate 16-color support, -
2
表示支持 256 色,或¥
2
to indicate 256-color support, or -
3
表示支持 1600 万色。¥
3
to indicate 16 million-color support.
当使用 FORCE_COLOR
并设置为支持的值时,NO_COLOR
和 NODE_DISABLE_COLORS
环境变量都将被忽略。
¥When FORCE_COLOR
is used and set to a supported value, both the NO_COLOR
,
and NODE_DISABLE_COLORS
environment variables are ignored.
任何其他值都会导致彩色输出被禁用。
¥Any other value will result in colorized output being disabled.