mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-13 18:10:59 +00:00
support krm spec v1 and legacy path, index, and id annotations
This commit is contained in:
@@ -51,7 +51,15 @@ func WrapErrorWithFile(err error, meta yaml.ResourceMeta) error {
|
||||
if err == nil {
|
||||
return err
|
||||
}
|
||||
path := meta.Annotations[kioutil.PathAnnotation]
|
||||
index := meta.Annotations[kioutil.IndexAnnotation]
|
||||
if path == "" {
|
||||
path = meta.Annotations[kioutil.LegacyPathAnnotation]
|
||||
}
|
||||
if index == "" {
|
||||
index = meta.Annotations[kioutil.LegacyPathAnnotation]
|
||||
}
|
||||
return errors.WrapPrefixf(err, "%s [%s]",
|
||||
meta.Annotations[kioutil.PathAnnotation],
|
||||
meta.Annotations[kioutil.IndexAnnotation])
|
||||
meta.Annotations[path],
|
||||
meta.Annotations[index])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user