Unable to use conpty pseudo-terminal on Windows runner
Describe the bug
On windows-latest, the conpty pseudo-terminal library does not write to the expected pipe, the output appears in the actions log output but never gets written to the pipe so read operations fail.
Here is some sample Rust code that reproduces the issue:
use std::io::Read;
#[test]
#[cfg(windows)]
fn conpty_echo() {
let mut proc = conpty::spawn("echo Hello World").unwrap();
let mut reader = proc.output().unwrap();
let mut buf = [0; 1024];
reader.read(&mut buf).unwrap();
assert!(String::from_utf8_lossy(&buf).contains("Hello World"));
}
The output in the Github runner looks like this:
running 1 test
Hello World
test conpty_echo has been running for over 60 seconds
To Reproduce
Deploy the above test spec to a windows-latest runner.
Expected behavior
I expect the read operation on the pseudo-terminal to complete.
This code works as expected running locally on Windows to it appears to be something specific to the github runner. I have pseudo-terminal based tests working fine on Linux and MacOS runners and would really like to run the same tests in a Windows pseudo-terminal.
Any help understanding this much appreciated 🙏
This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 15 days.
I don't think this stale, the problem persists as far as I know.