Skip to content

Commit

Permalink
Fix bug where legacy creds are reset after call to configure subcomma…
Browse files Browse the repository at this point in the history
…nd. (#260)
  • Loading branch information
Integralist authored Apr 20, 2021
1 parent 06e7526 commit 3652f69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/config/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,11 @@ func (f *File) Load(configEndpoint string, httpClient api.HTTPClient) error {
f.CLI.Version = revision.SemVer(revision.AppVersion)
f.CLI.LastChecked = time.Now().Format(time.RFC3339)

if f.Legacy.Token != "" {
if f.Legacy.Token != "" && f.User.Token == "" {
f.User.Token = f.Legacy.Token
}

if f.Legacy.Email != "" {
if f.Legacy.Email != "" && f.User.Email == "" {
f.User.Email = f.Legacy.Email
}

Expand Down

0 comments on commit 3652f69

Please sign in to comment.