Skip to content

Commit

Permalink
gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jaxxstorm committed Oct 18, 2022
1 parent c4b5b05 commit b9e26ae
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion pkg/config/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
// GetSSOToken loops through all the caches files and extracts a valid token to use
func GetSSOToken(files []fs.DirEntry, ssoConfig SSOConfig, homedir string) (string, error) {


if len(files) > 0 {
// loop through all the files
for _, file := range files {
Expand Down
2 changes: 0 additions & 2 deletions pkg/credentials/creds.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@ func GetSSOCredentials(profile string, homedir string) (*sso.GetRoleCredentialsO
return nil, "", fmt.Errorf("error retrieving SSO config: %w", err)
}


cacheFiles, err := os.ReadDir(filepath.Join(homedir, ".aws", "sso", "cache"))
if err != nil {
return nil, "", fmt.Errorf("error retrieving cache files - perhaps you need to login?: %w", err)
}


token, err := config.GetSSOToken(cacheFiles, *ssoConfig, homedir)
if err != nil {
return nil, "", fmt.Errorf("error retrieving SSO token from cache files: %w", err)
Expand Down

0 comments on commit b9e26ae

Please sign in to comment.