Skip to content

Commit

Permalink
🐛 only add loaded providers (#1854)
Browse files Browse the repository at this point in the history
ListAll was able to return providers that could not be loaded.

Signed-off-by: Dominik Richter <[email protected]>
  • Loading branch information
arlimus authored Sep 22, 2023
1 parent 8714ac0 commit 36075f9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions providers/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func ListAll() ([]*Provider, error) {
for i := range all {
provider := all[i]

// builtin providers don't need to be loaded, so they ok to be returned
// builtin providers don't need to be loaded, so they are ok to be returned
if provider.Path == "" {
res = append(res, provider)
continue
Expand All @@ -147,8 +147,8 @@ func ListAll() ([]*Provider, error) {
}
}

CachedProviders = all
return all, nil
CachedProviders = res
return res, nil
}

// EnsureProvider find the provider for a given connector either from the list
Expand Down

0 comments on commit 36075f9

Please sign in to comment.