mirror of
https://github.com/strongdm/comply
synced 2024-11-22 07:34:54 +00:00
Change loadMDMD method to return the error (#48)
This commit is contained in:
parent
ac11b307ec
commit
373e7737ab
@ -155,9 +155,7 @@ func ReadPolicies() ([]*Document, error) {
|
|||||||
for _, f := range files {
|
for _, f := range files {
|
||||||
p := &Document{}
|
p := &Document{}
|
||||||
mdmd, err := loadMDMD(f.FullPath)
|
mdmd, err := loadMDMD(f.FullPath)
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
err = yaml.Unmarshal([]byte(mdmd.yaml), &p)
|
err = yaml.Unmarshal([]byte(mdmd.yaml), &p)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "unable to parse "+f.FullPath)
|
return nil, errors.Wrap(err, "unable to parse "+f.FullPath)
|
||||||
|
Loading…
Reference in New Issue
Block a user