Skip to content

Commit 1d47462

Browse files
L-Chaodjc
authored andcommitted
feat(part): add NO_COLOR env support for windows terminal
1 parent 02c3549 commit 1d47462

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/windows_term/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ pub(crate) fn is_a_color_terminal(out: &Term) -> bool {
6969
if !is_a_terminal(out) {
7070
return false;
7171
}
72+
if env::var("NO_COLOR").is_ok() {
73+
return false;
74+
}
7275
if msys_tty_on(out) {
7376
return match env::var("TERM") {
7477
Ok(term) => term != "dumb",

0 commit comments

Comments
 (0)