-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pipes detected as a tty on MSYS #23
Comments
alexcrichton
added a commit
to alexcrichton/atty
that referenced
this issue
Mar 5, 2018
The MSYS terminal appears to create pipes with the name `msys-` but *don't* contain `-pty`, so this changes the `||` logic to `&&` to ensure that the logic here doesn't fire for MSYS terminals where piping is used to erroneously diagnose a stdio stream as a tty. Closes softprops#23
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've initially attempted to integrate atty/termcolor into rustc at rust-lang/rust#48588 but unfortunately it looks like there may be a misdiagnosis of terminal colors! It looks like in the MSYS terminal/shell pipes are classified as ttys, for example this program:
Will print:
when run in MSYS.
The same program for Unix, however, prints:
With some debugging it looks like the filename reported for the MSYS pipes are along the lines of:
which looks to trigger this logic. Was the
||
there supposed to be&&
?The text was updated successfully, but these errors were encountered: