Skip to content

Commit

Permalink
Update list_roles.go
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Berchtold authored Dec 1, 2023
1 parent a9a16c7 commit f3e5743
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions cmd/saml2aws/commands/list_roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,7 @@ func ListRoles(loginFlags *flags.LoginExecFlags) error {
}

func listRoles(awsRoles []*saml2aws.AWSRole, samlAssertion string, loginFlags *flags.LoginExecFlags) error {
if len(awsRoles) == 1 {
log.Println("")
log.Println("Only one role to assume. Will be automatically assumed on login")
log.Println(awsRoles[0].RoleARN)
return nil
} else if len(awsRoles) == 0 {
if len(awsRoles) == 0 {
return errors.New("no roles available")
}

Expand Down

0 comments on commit f3e5743

Please sign in to comment.