Skip to content

Commit

Permalink
Remove sorting in case the switch is off (#5088)
Browse files Browse the repository at this point in the history
  • Loading branch information
Skarlso authored Apr 7, 2022
1 parent 4f1f1b0 commit 24d9aef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ctl/create/iamidentitymapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func doCreateIAMIdentityMapping(cmd *cmdutils.Cmd, options iamIdentityMappingOpt
for _, identity := range identities {
arn := identity.ARN()

if iam.CompareIdentity(id, identity) && options.NoDuplicateArns {
if options.NoDuplicateArns && iam.CompareIdentity(id, identity) {
logger.Warning("found existing mapping that matches the one being created, quitting.")
return nil
}
Expand Down

0 comments on commit 24d9aef

Please sign in to comment.