Skip to content

Commit

Permalink
Remove confusing else statement in cache.go
Browse files Browse the repository at this point in the history
  • Loading branch information
liamfallon committed Oct 7, 2024
1 parent c5599d6 commit 5108f8f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,9 @@ func (c *Cache) OpenRepository(ctx context.Context, repositorySpec *configapi.Re
UseGitCaBundle: c.useGitCaBundle,
}); err != nil {
return nil, err
} else {
cachedRepo = newRepository(key, repositorySpec, r, c.objectNotifier, c.metadataStore, c.repoSyncFrequency)
c.repositories[key] = cachedRepo
}
cachedRepo = newRepository(key, repositorySpec, r, c.objectNotifier, c.metadataStore, c.repoSyncFrequency)
c.repositories[key] = cachedRepo
} else {
// If there is an error from the background refresh goroutine, return it.
if err := cachedRepo.getRefreshError(); err != nil {
Expand Down

0 comments on commit 5108f8f

Please sign in to comment.