-
Notifications
You must be signed in to change notification settings - Fork 332
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
Improve isatty support #2349
Improve isatty support #2349
Conversation
15efc5c
to
d673a32
Compare
Is there anything that can be tested here? We should at least make sure this codepath is executed in |
I'm currently tricking Miri into thinking it has a TTY by running |
Yeah we cannot check the return value of |
@bors r+ |
☀️ Test successful - checks-actions |
Per #2292 (comment), this is an attempt at
Since Unix -> Unix is very simple, I'm starting with a patch that just does that. Happy to augment/rewrite this based on feedback.
The linked file in libtest specifically only supports stdout. If we're doing this to support terminal applications, I think it would be strange to support one but not all 3 of the standard streams.
The
atty
crate contains a bunch of extra logic that libtest does not contain, in order to support MSYS terminals: softprops/atty@db8d55f so I think if we're going to do Windows support, we should probably access all that logic somehow. I think it's pretty clear that the implementation is not going to change, so I think if we want to, pasting the contents of theatty
crate into Miri is on the table, instead of taking a dependency.