Skip to content

Commit

Permalink
fix a check in case configuration has an error (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
pns-nirmata authored Jan 19, 2023
1 parent e209814 commit da0e653
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/awsadapterconfig_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ func (r *AWSAdapterConfigReconciler) Reconcile(ctx context.Context, req ctrl.Req
clusterFound := false

callerIdentity, err := stsClient.GetCallerIdentity(ctx, &sts.GetCallerIdentityInput{})
if err != nil || callerIdentity.Account == nil {
if callerIdentity.Account == nil {
if err != nil || callerIdentity == nil || callerIdentity.Account == nil {
if callerIdentity == nil || callerIdentity.Account == nil {
err = fmt.Errorf("callerIdentity nil")
}

Expand Down

0 comments on commit da0e653

Please sign in to comment.