Skip to content

Commit 9b78fb7

Browse files
committed
Bring back force-tty flag for Windows
1 parent 7253eca commit 9b78fb7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cli/login_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ func TestLogin(t *testing.T) {
2121
t.Run("InitialUserTTY", func(t *testing.T) {
2222
t.Parallel()
2323
client := coderdtest.New(t)
24-
root, _ := clitest.New(t, "login", client.URL.String())
24+
// The --force-tty flag is required on Windows, because the `isatty` library does not
25+
// accurately detect Windows ptys when they are not attached to a process:
26+
// https://github.com/mattn/go-isatty/issues/59
27+
root, _ := clitest.New(t, "login", client.URL.String(), "--force-tty")
2528
console := clitest.NewConsole(t, root)
2629
go func() {
2730
err := root.Execute()

0 commit comments

Comments
 (0)