Skip to content

Commit

Permalink
potential nil pointer dereference
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDan4es committed Nov 20, 2024
1 parent 40cd269 commit 31f7051
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions metadata/multirepo/multirepo.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,11 @@ func (client *MultiRepoClient) DownloadTarget(repos []string, targetFile *metada
log := metadata.GetLogger()

for _, repoName := range repos {
if _, ok := client.TUFClients[repoName]; !ok {
log.Error(fmt.Errorf("client not found"), "No client found for this repo", "repo", repoName)
continue
}

// see if the target is already present locally
targetPath, targetBytes, err := client.TUFClients[repoName].FindCachedTarget(targetFile, filePath)
if err != nil {
Expand Down

0 comments on commit 31f7051

Please sign in to comment.