Skip to content

Commit

Permalink
enh: Give info when unable to load list of repos
Browse files Browse the repository at this point in the history
  • Loading branch information
smutel committed Apr 22, 2022
1 parent d955b06 commit 96d4689
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ List of contributors, in chronological order:
* Lorenzo Bolla (https://github.com/lbolla)
* Benj Fassbind (https://github.com/randombenj)
* Markus Muellner (https://github.com/mmianl)
* Samuel Mutel (https://github.com/smutel)
4 changes: 4 additions & 0 deletions cmd/publish_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ func aptlyPublishListTxt(cmd *commander.Command, args []string) error {
err = collectionFactory.PublishedRepoCollection().ForEach(func(repo *deb.PublishedRepo) error {
e := collectionFactory.PublishedRepoCollection().LoadComplete(repo, collectionFactory)
if e != nil {
fmt.Printf("Error found on one publish (prefix:%s / distribution:%s / component:%s\n)",
repo.StoragePrefix(), repo.Distribution, repo.Components())
return e
}

Expand Down Expand Up @@ -82,6 +84,8 @@ func aptlyPublishListJSON(cmd *commander.Command, args []string) error {
err = context.NewCollectionFactory().PublishedRepoCollection().ForEach(func(repo *deb.PublishedRepo) error {
e := context.NewCollectionFactory().PublishedRepoCollection().LoadComplete(repo, context.NewCollectionFactory())
if e != nil {
fmt.Printf("Error found on one publish (prefix:%s / distribution:%s / component:%s\n)",
repo.StoragePrefix(), repo.Distribution, repo.Components())
return e
}

Expand Down

0 comments on commit 96d4689

Please sign in to comment.