Skip to content

Commit 1faa215

Browse files
committed
Add comment describing why --force-tty is neede dfor test
1 parent 9922222 commit 1faa215

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cli/login_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ func TestLogin(t *testing.T) {
2626
console, err := expect.NewConsole(expect.WithStdout(clitest.StdoutLogs(t)))
2727
require.NoError(t, err)
2828
client := coderdtest.New(t)
29+
// The --force-tty is required on Windows, because the `isatty` library does not
30+
// accurately detect Windows ptys when they are not attached to a process:
31+
// https://github.com/mattn/go-isatty/issues/59
2932
root, _ := clitest.New(t, "login", client.URL.String(), "--force-tty")
3033
root.SetIn(console.InTty())
3134
root.SetOut(console.OutTty())

0 commit comments

Comments
 (0)