Skip to content

Commit

Permalink
Fix tanzu context additional metadata missing TMC endpoint details w…
Browse files Browse the repository at this point in the history
…hen the context was created with TANZU_API_TOKEN

Signed-off-by: Prem Kumar Kalle <[email protected]>
  • Loading branch information
prkalle committed Mar 19, 2024
1 parent b67a720 commit f8159a2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/command/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,9 @@ func doCSPAPITokenAuthAndUpdateContext(c *configtypes.Context, apiTokenValue str
expiresAt := time.Now().Local().Add(time.Second * time.Duration(token.ExpiresIn))
a.Expiration = expiresAt
c.GlobalOpts.Auth = a
c.AdditionalMetadata = make(map[string]interface{})
if c.AdditionalMetadata == nil {
c.AdditionalMetadata = make(map[string]interface{})
}

return claims, nil
}
Expand Down

0 comments on commit f8159a2

Please sign in to comment.