File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ pub fn stderr_isatty() -> bool {
44 isatty ( libc:: STDERR_FILENO )
55}
66
7- // FIXME: Unfortunately this doesn't detect msys terminals so rustup
8- // is always colorless there (just like rustc and cargo).
97#[ cfg( windows) ]
108pub fn stderr_isatty ( ) -> bool {
119 isatty ( winapi:: um:: winbase:: STD_ERROR_HANDLE )
@@ -30,6 +28,11 @@ fn isatty(fd: libc::c_int) -> bool {
3028#[ inline]
3129#[ cfg( windows) ]
3230fn isatty ( fd : winapi:: shared:: minwindef:: DWORD ) -> bool {
31+ if std:: env:: var ( "MSYSTEM" ) . is_ok ( ) {
32+ // FIXME: No color is better than broken color codes in MSYS shells
33+ // https://github.com/rust-lang/rustup/issues/2292
34+ return false ;
35+ }
3336 use winapi:: um:: { consoleapi:: GetConsoleMode , processenv:: GetStdHandle } ;
3437 unsafe {
3538 let handle = GetStdHandle ( fd) ;
You can’t perform that action at this time.
0 commit comments