fly: fix bug for password login
concourse/concourse#2819
@@ -367,8 +367,7 @@ func (command *LoginCommand) legacyAuth(target rc.Target) (string, string, error
if chosenMethod.Type == "" {
return "", "", errors.New("basic auth is not available")
}
- }
-
+ } else {
choices := make([]interact.Choice, len(authMethods))
for i, method := range authMethods {
@@ -396,6 +395,7 @@ func (command *LoginCommand) legacyAuth(target rc.Target) (string, string, error
fmt.Println("")
}
+ }
switch chosenMethod.Type {
case "oauth":
