1
0
mirror of https://github.com/strongdm/comply synced 2024-11-22 07:34:54 +00:00

handling errors when pandoc is missing (#100)

This commit is contained in:
vassalo 2021-10-07 16:03:00 -03:00
parent 34c0105b47
commit b1e88ea919
2 changed files with 8 additions and 0 deletions

View File

@ -87,6 +87,8 @@ func dockerPandoc(outputFilename string, errOutputCh chan error) {
errOutputCh <- errors.Wrap(err, "output not generated; verify your Docker image is up to date") errOutputCh <- errors.Wrap(err, "output not generated; verify your Docker image is up to date")
return return
} }
errOutputCh <- nil
} }
// 🐼 // 🐼

View File

@ -26,6 +26,12 @@ func pdf(output string, live bool, errCh chan error, wg *sync.WaitGroup) {
} }
for _, policy := range policies { for _, policy := range policies {
renderToFilesystem(&pdfWG, errOutputCh, data, policy, live) renderToFilesystem(&pdfWG, errOutputCh, data, policy, live)
err = <-errOutputCh
if err != nil {
errCh <- err
wg.Done()
return
}
} }
narratives, err := model.ReadNarratives() narratives, err := model.ReadNarratives()