File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -278,8 +278,7 @@ func (r *RootCmd) login() *clibase.Cmd {
278
278
}
279
279
280
280
sessionToken , err = cliui .Prompt (inv , cliui.PromptOptions {
281
- Text : "Paste your token here:" ,
282
- Secret : true ,
281
+ Text : "Paste your token here:" ,
283
282
Validate : func (token string ) error {
284
283
client .SetSessionToken (token )
285
284
_ , err := client .User (ctx , codersdk .Me )
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package cli_test
3
3
import (
4
4
"context"
5
5
"fmt"
6
+ "runtime"
6
7
"testing"
7
8
8
9
"github.com/stretchr/testify/assert"
@@ -170,6 +171,10 @@ func TestLogin(t *testing.T) {
170
171
171
172
pty .ExpectMatch ("Paste your token here:" )
172
173
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
+ }
173
178
pty .ExpectMatch ("Welcome to Coder" )
174
179
<- doneChan
175
180
})
@@ -193,6 +198,10 @@ func TestLogin(t *testing.T) {
193
198
194
199
pty .ExpectMatch ("Paste your token here:" )
195
200
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
+ }
196
205
pty .ExpectMatch ("That's not a valid token!" )
197
206
cancelFunc ()
198
207
<- doneChan
You can’t perform that action at this time.
0 commit comments