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

Skip calling Windows console api with piped stdin #51

Merged
merged 3 commits into from Jun 18, 2020

Conversation

Heliozoa
Copy link
Contributor

Fixes #50

I implemented the changes discussed in the issue. I also wrote a test that fails on Windows in the current master branch and passes after the changes, but it feels a bit hacky as it just runs one of the examples...

@Heliozoa
Copy link
Contributor Author

Looks like the 1.33.0 version of rustc used by appveyor doesn't understand the temporary borrow in the test. Adding braces around it like so

{
    let stdin = out.stdin.as_mut().unwrap();
    stdin.write_all("secret".as_bytes()).unwrap();
}

or upgrading the appveyor version to 1.44.0 (or whenever this was fixed) should fix it.

@conradkleinespel
Copy link
Owner

@Heliozoa Feel free to upgrade Rust version to 1.44 in appveyor & travis configs, that'll make things easier. If people want to upgrade, they'll just have to use 1.44 too.

@equalsraf
Copy link
Contributor

:+1 on my end, and nice going on the test.

@conradkleinespel
Copy link
Owner

Awesome, thank you both! I'll go ahead and merge. Then I'll publish to crates.io. Because users need to potentially upgrade their version of Rust, it is a "breaking" change so it'll be a major version increase.

@conradkleinespel conradkleinespel merged commit 189c388 into conradkleinespel:master Jun 18, 2020
@conradkleinespel
Copy link
Owner

Just saw that there is another PR I need to merge before publishing to avoid multiple major version increases. I'll get around to doing this the coming weekend.

Until then, I encourage you to use the git way of defining the dependency:

[dependencies]
rpassword = { git = "https://github.com/conradkleinespel/rpassword", rev = "189c388" }

ValliereMagic pushed a commit to ValliereMagic/rpassword that referenced this pull request Jun 26, 2023
* skip calling windows console api with piped stdin

* test with piped stdin

* upgrade appveyor's rustc to 1.44.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

read_password fails on Windows when stdin is piped
3 participants