We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6aece4f commit 21031b7Copy full SHA for 21031b7
1 file changed
pkg/auth/auth.go
@@ -182,12 +182,13 @@ func (t Auth) PromptForLogin() (*LoginTokens, error) {
182
183
func shouldLogin() (bool, error) {
184
reader := bufio.NewReader(os.Stdin) // TODO 9 inject?
185
- fmt.Print(`You are currently logged out, would you like to log in? [y/n]: `)
+ fmt.Print(`You are currently logged out, would you like to log in? [Y/n]: `)
186
text, err := reader.ReadString('\n')
187
if err != nil {
188
return false, breverrors.WrapAndTrace(err)
189
}
190
- return strings.ToLower(strings.TrimSpace(text)) == "y", nil
+ trimmed := strings.ToLower(strings.TrimSpace(text))
191
+ return trimmed == "y" || trimmed == "", nil
192
193
194
func (t Auth) LoginWithToken(token string) error {
0 commit comments