GhostManager / Ghostwriter

The SpecterOps project management and reporting engine
https://ghostwriter.wiki
BSD 3-Clause "New" or "Revised" License
1.23k stars 174 forks source link

Fix error message from linting a docx file with invalid syntax #470

Closed ColonelThirtyTwo closed 4 days ago

ColonelThirtyTwo commented 5 days ago

get_undeclared_template_variables processes the template but wasn't wrapped in map_jinja2_render_errors, so syntax errors weren't being caught properly and failing with a generic failure. This patch fixes it to throw correctly and show the error to the user.

codecov[bot] commented 5 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.95%. Comparing base (a663368) to head (3660bfe).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #470 +/- ## ======================================= Coverage 91.95% 91.95% ======================================= Files 310 310 Lines 18102 18102 ======================================= Hits 16645 16645 Misses 1457 1457 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.