ignore yaml files that do not include any entries

This commit is contained in:
Andrew Lavery
2019-01-27 22:23:48 -08:00
parent 93515517b8
commit 209b115b7c

View File

@@ -52,6 +52,9 @@ func (kf *KunstructuredFactoryImpl) SliceFromBytes(
var out unstructured.Unstructured
err = decoder.Decode(&out)
if err == nil {
if len(out.Object) == 0 {
continue
}
err = kf.validate(out)
if err != nil {
return nil, err