gpoore / codebraid

Live code in Pandoc Markdown
BSD 3-Clause "New" or "Revised" License
376 stars 13 forks source link

Non-zero exit code when exceptions were issued? #24

Closed sergei-mironov closed 11 months ago

sergei-mironov commented 4 years ago

Could you please consider adding a feature of returning non-zero exit codes if one or more exceptions were issued? It would help e.g in using codebraid in Makefiles.

Currently we are to grep the output documents for magic words from stack traces which is a bit fragile.

gpoore commented 4 years ago

That's a good suggestion. I'll add that in the next version.

gpoore commented 2 years ago

The latest release adds exit codes. Based on the exit code, it is possible to determine whether there were errors or warnings, and whether they were primarily related to the document or to code execution. Details: https://github.com/gpoore/codebraid/blob/master/CHANGELOG.md. I'll update the documentation soon. I suspect there may be a need to add a command-line option to disable non-zero exit codes, but we'll see what happens.