Skip to content

Commit

Permalink
fix: bug with no alias check (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekristen authored Feb 7, 2024
1 parent ea35f26 commit d2e561e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/awsutil/account.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package awsutil

import (
"fmt"
"strings"

"github.com/pkg/errors"
Expand Down Expand Up @@ -76,6 +77,10 @@ func (a *Account) ID() string {
}

func (a *Account) Alias() string {
if len(a.aliases) == 0 {
return fmt.Sprintf("no-alias-%s", a.ID())
}

return a.aliases[0]
}

Expand Down

0 comments on commit d2e561e

Please sign in to comment.