Skip to content

Commit

Permalink
Add empty source check
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Kuziemko committed Dec 20, 2021
1 parent c7c58b0 commit 77d4bd6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/populator/cmd/register/ocf_manifests.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ func runDBPopulateWithSources(ctx context.Context, sources []string) (err error)
}

sources = removeDuplicateSources(sources)
if len(sources) == 0 {
return fmt.Errorf("no source information provided")
}

sourcesInfo, err := getSourcesInfo(ctx, cfg, log, sources, parentDir)
if err != nil {
return errors.Wrap(err, "while getting sources info")
Expand Down

0 comments on commit 77d4bd6

Please sign in to comment.