Skip to content

Commit 5fedea9

Browse files
authored
CLOUDP-125111: Revert color causing windows issue (#1286)
1 parent ddcf064 commit 5fedea9

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ require (
1212
github.com/PaesslerAG/jsonpath v0.1.1
1313
github.com/aws/aws-sdk-go v1.44.24
1414
github.com/briandowns/spinner v1.18.1
15-
github.com/fatih/color v1.13.0
1615
github.com/gemalto/kmip-go v0.0.6-0.20210426170211-84e83580888d
1716
github.com/go-test/deep v1.0.8
1817
github.com/golang-jwt/jwt/v4 v4.4.1
@@ -53,6 +52,7 @@ require (
5352
github.com/PaesslerAG/gval v1.0.0 // indirect
5453
github.com/ansel1/merry v1.5.1 // indirect
5554
github.com/davecgh/go-spew v1.1.1 // indirect
55+
github.com/fatih/color v1.13.0 // indirect
5656
github.com/fsnotify/fsnotify v1.5.4 // indirect
5757
github.com/gemalto/flume v0.12.0 // indirect
5858
github.com/go-stack/stack v1.8.0 // indirect

internal/cli/auth/login.go

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"time"
2222

2323
"github.com/AlecAivazis/survey/v2"
24-
"github.com/fatih/color"
2524
"github.com/mongodb/mongodb-atlas-cli/internal/cli"
2625
"github.com/mongodb/mongodb-atlas-cli/internal/cli/require"
2726
"github.com/mongodb/mongodb-atlas-cli/internal/config"
@@ -204,22 +203,15 @@ To verify your account, copy your one-time verification code:
204203
`)
205204

206205
userCode := fmt.Sprintf("%s-%s", code.UserCode[0:len(code.UserCode)/2], code.UserCode[len(code.UserCode)/2:])
207-
opts.printlnWithColor(color.New(color.FgYellow, color.Bold), userCode)
206+
_, _ = fmt.Fprintln(opts.OutWriter, userCode)
208207

209208
_, _ = fmt.Fprintf(opts.OutWriter, `
210209
Paste the code in the browser when prompted to activate your Atlas CLI. Your code will expire after %.0f minutes.
211210
212211
To continue, go to `,
213212
codeDuration.Minutes(),
214213
)
215-
opts.printlnWithColor(color.New(color.FgBlue, color.Bold), code.VerificationURI)
216-
}
217-
218-
func (opts *LoginOpts) printlnWithColor(c *color.Color, text string) {
219-
_, err := c.Fprintln(opts.OutWriter, text)
220-
if err != nil {
221-
_, _ = fmt.Fprintln(opts.OutWriter, text)
222-
}
214+
_, _ = fmt.Fprintln(opts.OutWriter, code.VerificationURI)
223215
}
224216

225217
func (opts *LoginOpts) handleBrowser(uri string) {

0 commit comments

Comments
 (0)