Content-Length: 276186 | pFad | http://github.com/coder/coder/issues/454

03 CLI | Windows | Creating initial user fails with TTY error · Issue #454 · coder/coder · GitHub
Skip to content

CLI | Windows | Creating initial user fails with TTY error #454

@bryphe-coder

Description

@bryphe-coder

Overview

On Windows, if I try to run the coder 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:

image

The bug is that we rely on a helper library - isatty to decide if we can handle input. The isatty function has an open issue for detecting Windows terminals

A temporary 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 the isatty 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiArea: HTTP API

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: http://github.com/coder/coder/issues/454

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy