Skip to content

Commit fb612d9

Browse files
committed
chore: handle errors on login/save profile and also persist profile
1 parent aa6dbd9 commit fb612d9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/login/client_login.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,12 @@ func Login(config *config.Config, input io.Reader) error {
5151
message := SuccessMessage(response.UserName, response.UserEmail, response.OrganizationName, response.TeamName, response.TeamMode == "console")
5252
ansi.StopSpinner(s, message, os.Stdout)
5353

54-
config.Profile.SaveProfile(config.LocalConfigFile != "")
54+
if err = config.Profile.SaveProfile(false); err != nil {
55+
return err
56+
}
57+
if err = config.Profile.UseProfile(); err != nil {
58+
return err
59+
}
5560

5661
return nil
5762
}

0 commit comments

Comments
 (0)