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
click.prompt(type=int, hide_input=True) outputs rejected input #1460
Comments
Did you have a fix in mind? One option is to wrap the call to |
No, I had not looked at the code or thought about it beyond just making sure the input does not end up in the output. Sounds like you think the concern is reasonable so I can try to find time to see if I can make a reasonable solution. |
When I find time, should I target 7.x or master? |
|
Fixed an error that would display prompt input in the error message even if hide_input was enabled
Fixed an error that would display prompt input in the error message even if hide_input was enabled
Update termui.py Minor formatting fix Fixes pallets#1460: hide prompt input if hide_input is enabled
Fix #1460: hide prompt input if hide_input is enabled
Despite asking
click.prompt()
to hide input it will still outputs the input if it rejects it. I get the same behavior for7.0
from PyPI,7.x
from Git, andmaster
from Git.If you specify a type (let's say you are inputting a numeric pin) then the same can happen with
click.password_option()
.altendky@p1:~$ venv/bin/python x.py Password: Error: lkjsaf is not a valid integer Password:
The workaround for
click.prompt()
anyways I guess is to not specify a type and to implement the rejection manually.If there is agreement that this is an issue that should be fixed then I can try to put together a PR for it.
The text was updated successfully, but these errors were encountered: