Skip to content
This repository has been archived by the owner on Aug 20, 2021. It is now read-only.

Commit

Permalink
Fix oscal generate issue (#26)
Browse files Browse the repository at this point in the history
when imports.href contains another profile oscal generate
command breaks as it currently does not support importing profiles
  • Loading branch information
Haroon Khan authored and anweiss committed Dec 21, 2018
1 parent 1a2674a commit e2c3972
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions generator/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ func ReadCatalog(r io.Reader) (*catalog.Catalog, error) {
if err != nil {
return nil, fmt.Errorf("cannot read oscal catalog from file %v,", err)
}

// oscalkit supports catalogs only at this point of time
if o.Catalog == nil {
return nil, fmt.Errorf("could not parse catalog")
}
return o.Catalog, nil

}
Expand Down

0 comments on commit e2c3972

Please sign in to comment.