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
Git Bash errors with prompt_password_stdout
or read_password
on Windows
#49
Comments
@bochaco Hi ! I am not aware of this bug. Unfortunately I don't use Windows so I wouldn't be able to help. Windows, with it's many shells (Powershell, CMD, etc), needs a bit more testing, as far as I'm aware. |
In current versions of msys2 and git-bash, applications that use the windows console api must be run with winpty. E.g cygwin supports the conpty api since cygwin version 3.1 but msys2 and git-bash currently use older versions. |
With |
Looks like this is an issue with how Git Bash works. I found this issue SBoudrias/Inquirer.js#421, and the linked issues led me to this github-for-windows FAQ answer which suggests running the program through
I also tried the regular command line, PowerShell 5/6 and the newer Windows Terminal and they all worked as expected. |
I'm getting OS error 6 ("The handle is invalid") on Windows using Git Bash when calling
prompt_password_stdout
orread_password
.I also tried using
read_password_from_tty
which not only throws that same error after hitting enter, but also the message is not shown and the characters I type are displayed on the console.I am currently using
read_password_from_tty
and it works for Linux, Mac, Windows Powershell, Windows CMD, but it fails with Windows Git Bash.Is there any workaround for this?
The text was updated successfully, but these errors were encountered: