File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -278,8 +278,7 @@ func (r *RootCmd) login() *clibase.Cmd {
278278 }
279279
280280 sessionToken , err = cliui .Prompt (inv , cliui.PromptOptions {
281- Text : "Paste your token here:" ,
282- Secret : true ,
281+ Text : "Paste your token here:" ,
283282 Validate : func (token string ) error {
284283 client .SetSessionToken (token )
285284 _ , err := client .User (ctx , codersdk .Me )
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package cli_test
33import (
44 "context"
55 "fmt"
6+ "runtime"
67 "testing"
78
89 "github.com/stretchr/testify/assert"
@@ -170,6 +171,10 @@ func TestLogin(t *testing.T) {
170171
171172 pty .ExpectMatch ("Paste your token here:" )
172173 pty .WriteLine (client .SessionToken ())
174+ if runtime .GOOS != "windows" {
175+ // For some reason, the match does not show up on Windows.
176+ pty .ExpectMatch (client .SessionToken ())
177+ }
173178 pty .ExpectMatch ("Welcome to Coder" )
174179 <- doneChan
175180 })
@@ -193,6 +198,10 @@ func TestLogin(t *testing.T) {
193198
194199 pty .ExpectMatch ("Paste your token here:" )
195200 pty .WriteLine ("an-invalid-token" )
201+ if runtime .GOOS != "windows" {
202+ // For some reason, the match does not show up on Windows.
203+ pty .ExpectMatch ("an-invalid-token" )
204+ }
196205 pty .ExpectMatch ("That's not a valid token!" )
197206 cancelFunc ()
198207 <- doneChan
You can’t perform that action at this time.
0 commit comments