diff --git a/pkg/provider/provider.go b/pkg/provider/provider.go index 26c5f08..abe3b79 100644 --- a/pkg/provider/provider.go +++ b/pkg/provider/provider.go @@ -232,17 +232,21 @@ func listProviders(cctx *cli.Context, exclude map[peer.ID]struct{}) error { return nil } + onlyWithError := cctx.Bool("error") + if cctx.Bool("id-only") { for _, pinfo := range provs { if _, ok := exclude[pinfo.AddrInfo.ID]; ok { continue } + if onlyWithError && pinfo.LastError == "" { + continue + } fmt.Println(pinfo.AddrInfo.ID) } return nil } - onlyWithError := cctx.Bool("error") for _, pinfo := range provs { if _, ok := exclude[pinfo.AddrInfo.ID]; ok { continue