diff --git a/cmd/guacone/cmd/bad.go b/cmd/guacone/cmd/bad.go index a721f1ca30..42c3c8c53d 100644 --- a/cmd/guacone/cmd/bad.go +++ b/cmd/guacone/cmd/bad.go @@ -65,6 +65,11 @@ var queryBadCmd = &cobra.Command{ logger.Fatalf("error querying for package: %v", err) } + if len(certifyBadResponse.CertifyBad) == 0 { + fmt.Println("No CertifyBad nodes found!") + return + } + mapCertifyBad := map[string][]model.CertifyBadCertifyBad{} for _, certifyBad := range certifyBadResponse.CertifyBad { switch subject := certifyBad.Subject.(type) {