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

Password prompt with redirected stdout #247

Open
cloudhead opened this issue Apr 15, 2024 · 0 comments
Open

Password prompt with redirected stdout #247

cloudhead opened this issue Apr 15, 2024 · 0 comments

Comments

@cloudhead
Copy link

cloudhead commented Apr 15, 2024

When using a Password prompt with my stdout redirected, I get the error "the input device is not a TTY".

For example, let's say I have a program that takes a password and outputs to standard out, and I'd like to redirect that to a file:

$ my-program > output.txt

I'd expect to see:

$ my-program > output.txt
? Password: *****

But instead I get an error about the input device.

I think the issue here is that the password prompt is written to stdout instead of stderr. I thought this was fixed a while ago in #89 but maybe it was for other prompts?

Happy to look into this and open a PR if needed.

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

No branches or pull requests

1 participant