mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 01:14:22 +00:00
Error for null files while reading
This commit is contained in:
@@ -72,15 +72,8 @@ func (w ByteWriter) Write(nodes []*yaml.RNode) error {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(pwittrock): factor this into a a common module for pruning empty values
|
||||
_, err := nodes[i].Pipe(yaml.Lookup("metadata"), yaml.FieldClearer{
|
||||
Name: "annotations", IfEmpty: true})
|
||||
if err != nil {
|
||||
return errors.Wrap(err)
|
||||
}
|
||||
_, err = nodes[i].Pipe(yaml.FieldClearer{Name: "metadata", IfEmpty: true})
|
||||
if err != nil {
|
||||
return errors.Wrap(err)
|
||||
if err := yaml.ClearEmptyAnnotations(nodes[i]); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if w.Style != 0 {
|
||||
|
||||
Reference in New Issue
Block a user