Skip to content

Commit

Permalink
fix: null ptr dereference for when refreshing (#179)
Browse files Browse the repository at this point in the history
Fixes #178
  • Loading branch information
PaarthShah authored Jul 8, 2024
1 parent d066dcd commit c916911
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/refresh.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ func RefreshCredentials(oidcClient ssooidciface.SSOOIDCAPI, ssoClient ssoiface.S
var roleName *string

lui, err := readUsageInformation()
zap.S().Infof("Attempting to refresh credentials for account [%s] with role [%s]", lui.AccountName, lui.Role)
if err != nil {
if strings.Contains(err.Error(), "no such file") {
zap.S().Info("Nothing to refresh yet")
Expand All @@ -50,6 +49,7 @@ func RefreshCredentials(oidcClient ssooidciface.SSOOIDCAPI, ssoClient ssoiface.S
} else {
accountId = &lui.AccountId
roleName = &lui.Role
zap.S().Infof("Attempting to refresh credentials for account [%s] with role [%s]", *accountId, *roleName)
}

rci := &sso.GetRoleCredentialsInput{AccountId: accountId, RoleName: roleName, AccessToken: &clientInformation.AccessToken}
Expand Down

0 comments on commit c916911

Please sign in to comment.