From c916911af8949df353b81a0f152c2f69f1162fa6 Mon Sep 17 00:00:00 2001 From: Paarth Shah Date: Sun, 7 Jul 2024 22:35:38 -0700 Subject: [PATCH] fix: null ptr dereference for when refreshing (#179) Fixes #178 --- internal/refresh.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/refresh.go b/internal/refresh.go index 7c79470..be36735 100644 --- a/internal/refresh.go +++ b/internal/refresh.go @@ -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") @@ -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}