Skip to content
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

Changed STDIN to /dev/tty #407

Closed
wants to merge 23 commits into from
Closed

Changed STDIN to /dev/tty #407

wants to merge 23 commits into from

Conversation

TimonPost
Copy link
Member

No description provided.

@japert
Copy link

japert commented Apr 6, 2020

I tried this branch on macOS 10.15.4.
Getting:

$ cargo run --features="event-stream" --example event-stream-tokio
thread 'main' panicked at 'Event source can not be initialized: IoError(Os { code: 22, kind: InvalidInput, message: "Invalid argument" })', src/event/read.rs:30:17
               note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Which is the sam IoError I got on macOS on crossterm 0.17 but not on 0.17.1

@japert
Copy link

japert commented Apr 9, 2020

After the merge, I am still getting the same IoError.

@extrawurst
Copy link
Contributor

@japert yup I can confirm it’s still throwing the error on macOs

@TimonPost
Copy link
Member Author

Its unfortunate I cant test on mac os. It is right that in 0.17 there was a bug with the TTY. I reverted that bug with https://github.com/crossterm-rs/crossterm/pull/405/files, however this Pr introduces the same problem again. For some reason, on mac os, we cant use the TTY for input reading. It throws an error if we are opening the file.

@acidghost
Copy link
Contributor

This because of tokio-rs/mio#1377.

@TimonPost
Copy link
Member Author

Amazing! That could be the issue. Thanks for linking.

@TimonPost
Copy link
Member Author

Going to open a new PR to follow up on #735

@TimonPost TimonPost closed this Jan 11, 2023
@TimonPost TimonPost mentioned this pull request Jan 11, 2023
@cosmikwolf
Copy link

for anyone trying to get stdin working with crossterm, but having a hard time, I made an example repo on how to do it:
https://github.com/cosmikwolf/piped_cli_interactive

december1981 pushed a commit to december1981/crossterm that referenced this pull request Oct 26, 2023
@joshka joshka mentioned this pull request Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants