Skip to content

Commit 31ee38b

Browse files
authored
Merge pull request #833 from Liujingfang1/crd_errmsg
improve error message for loading files listed under crds
2 parents 46c7d6d + 28cefb3 commit 31ee38b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/transformers/config/factorycrd.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222

2323
"github.com/ghodss/yaml"
2424
"github.com/go-openapi/spec"
25+
"github.com/pkg/errors"
2526
"k8s.io/kube-openapi/pkg/common"
2627
"sigs.k8s.io/kustomize/pkg/gvk"
2728
"sigs.k8s.io/kustomize/pkg/ifc"
@@ -41,7 +42,7 @@ func LoadConfigFromCRDs(
4142
}
4243
m, err := makeNameToApiMap(content)
4344
if err != nil {
44-
return nil, err
45+
return nil, errors.Wrapf(err, "unable to parse open API definition from '%s'", path)
4546
}
4647
otherTc, err := makeConfigFromApiMap(m)
4748
if err != nil {

0 commit comments

Comments
 (0)