Skip to content

Commit

Permalink
Avoid overwriting entire KubeCredentials block
Browse files Browse the repository at this point in the history
  • Loading branch information
idogada-akamai committed Sep 22, 2024
1 parent 2250640 commit e28cb50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/kubectl_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ func cacheCredential(ctx *cli.Context, cred *config.ExecCredential, id string) e
return err
}

if sc.KubeCredentials[id] == nil {
if sc.KubeCredentials == nil {
sc.KubeCredentials = make(map[string]*config.ExecCredential)
}
sc.KubeCredentials[id] = cred
Expand Down

0 comments on commit e28cb50

Please sign in to comment.