mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
enh: Give info when unable to load list of repos
This commit is contained in:
committed by
Benj Fassbind
parent
152538ccc1
commit
4c04e77489
@@ -46,3 +46,4 @@ List of contributors, in chronological order:
|
|||||||
* Benj Fassbind (https://github.com/randombenj)
|
* Benj Fassbind (https://github.com/randombenj)
|
||||||
* Markus Muellner (https://github.com/mmianl)
|
* Markus Muellner (https://github.com/mmianl)
|
||||||
* Chuan Liu (https://github.com/chuan)
|
* Chuan Liu (https://github.com/chuan)
|
||||||
|
* Samuel Mutel (https://github.com/smutel)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package cmd
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"os"
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
"github.com/aptly-dev/aptly/deb"
|
"github.com/aptly-dev/aptly/deb"
|
||||||
@@ -35,6 +36,8 @@ func aptlyPublishListTxt(cmd *commander.Command, args []string) error {
|
|||||||
err = collectionFactory.PublishedRepoCollection().ForEach(func(repo *deb.PublishedRepo) error {
|
err = collectionFactory.PublishedRepoCollection().ForEach(func(repo *deb.PublishedRepo) error {
|
||||||
e := collectionFactory.PublishedRepoCollection().LoadComplete(repo, collectionFactory)
|
e := collectionFactory.PublishedRepoCollection().LoadComplete(repo, collectionFactory)
|
||||||
if e != nil {
|
if e != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error found on one publish (prefix:%s / distribution:%s / component:%s\n)",
|
||||||
|
repo.StoragePrefix(), repo.Distribution, repo.Components())
|
||||||
return e
|
return e
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,6 +85,8 @@ func aptlyPublishListJSON(cmd *commander.Command, args []string) error {
|
|||||||
err = context.NewCollectionFactory().PublishedRepoCollection().ForEach(func(repo *deb.PublishedRepo) error {
|
err = context.NewCollectionFactory().PublishedRepoCollection().ForEach(func(repo *deb.PublishedRepo) error {
|
||||||
e := context.NewCollectionFactory().PublishedRepoCollection().LoadComplete(repo, context.NewCollectionFactory())
|
e := context.NewCollectionFactory().PublishedRepoCollection().LoadComplete(repo, context.NewCollectionFactory())
|
||||||
if e != nil {
|
if e != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error found on one publish (prefix:%s / distribution:%s / component:%s\n)",
|
||||||
|
repo.StoragePrefix(), repo.Distribution, repo.Components())
|
||||||
return e
|
return e
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user