-
Notifications
You must be signed in to change notification settings - Fork 112
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
mintty read_key fails with "Incorrect function" #35
Comments
I would need help tracking this down. I'm not using mintty myself. |
This issue is the root cause of mitsuhiko/insta#79. |
It's the call to
|
The root cause seems to be mintty/mintty#906? |
I wonder if the msys detection does not work here. This is how we detect msys currently: https://github.com/mitsuhiko/console/blob/d35ce3e524106bb3c05e9747c8e41408bc073663/src/windows_term.rs#L334-L362 |
The code seems correct to me? I printed the name and got UPDATE: Forgot to mention I'm running |
It seems like let file_type = unsafe { winapi::um::fileapi::GetFileType(handle) };
println!("file_type is {}", file_type); It prints 3 when I use |
Would be happy to merge a fix if someone has one. I'm not using git-bash myself. |
So, one workaround that should work on mingw64 is to use winpty. So let's say the app you have which uses this library is called So you run |
This PR delays the formatting of the fields and instead stores them on the `Task` struct. This allows for nicer formatting options. Currently we just bold the field names in the task tables view. fix console-rs#33 Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
I would still like to fix this issue but as mentioned I do not use mintty. If someone is, help would really be appreciated here. |
I am occasionally using TERM: xterm, MSYSTEM: "MINGW64" |
Running this code using mintty. Ran this code using msys and mingw. When running though the integrated terminal in visual studio code the code passes. When running it on mintty it fails with the line
Error: Os { code: 1, kind: Other, message: "Incorrect function." }
The text was updated successfully, but these errors were encountered: