Skip to content

Commit

Permalink
fix: incorrect test of identity token value
Browse files Browse the repository at this point in the history
  • Loading branch information
mvanholsteijn committed Sep 10, 2023
1 parent bbed196 commit 51f5b10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (c *RootCommand) GetSTSCredentials() error {

c.RoleArn = fmt.Sprintf("arn:aws:iam::%s:role/%s", c.AwsAccount, c.RoleName)

if c.WebIdentityToken = os.Getenv(c.WebIdentityTokenName); c.WebIdentityToken != "" {
if c.WebIdentityToken = os.Getenv(c.WebIdentityTokenName); c.WebIdentityToken == "" {
return errors.New(fmt.Sprintf("the environment variable %s is not set", c.WebIdentityTokenName))
}

Expand Down

0 comments on commit 51f5b10

Please sign in to comment.