- Notifications
You must be signed in to change notification settings - Fork1k
Description
Overview
On Windows, if I try to run thecoder login
command flow to create an initial user, the command fails with:Error: the initial user cannot be created in non-interactive mode
See@vapurrmaid 's screenshot:
The bug is that we rely on a helper library -isatty
to decide if we can handle input. Theisatty
function has anopen issue for detecting Windows terminals
Atemporary workaround is to use the--force-tty
flag for the CLI. This overrides the check, and tells the binary to assume it is used in a tty. We implemented this to ensure the tests pass reliably on automation, and we assumed that this bug only occurred in automated tests - but it seems like that assumption was invalid.
It looks like in@vapurrmaid 's case - a MINGW console is used. We should evaluate theisatty
behavior on a few different consoles in Windows (because there are a lot of cases...):
- Raw win32 console (cmd.exe)
- Powershell (powershell.exe)
- MINGW Bash
- Cygwin Bash