Closed pasieronen closed 2 years ago
The Ruby asciidoc CLI has option --failure-level which forces the CLI to exit with non-zero status code if the specified logging level (severity) is reached. See: https://github.com/asciidoctor/asciidoctor/pull/2674, https://github.com/asciidoctor/asciidoctor/issues/2003, https://github.com/asciidoctor/asciidoctor/issues/854
--failure-level
It would be nice to have the same feature in AsciidoctorJ CLI, too. (To e.g. catch missing included files in CI builds)
I haven't touched AsciidoctorJ code before, but it looks like the relevant Ruby code is in https://github.com/asciidoctor/asciidoctor/blob/main/lib/asciidoctor/cli/invoker.rb , which AsciidoctorJ does not call.
Here's a quick attempt at doing what the Ruby CLI does: https://github.com/pasieronen/asciidoctorj/commit/f94d332eb7aaf468e4f1674bf650a5c3037fa095 Any thoughts on that?
Thanks, this is a great start. Do you want to open a PR? Then we can continue discussing on that..
The Ruby asciidoc CLI has option
--failure-level
which forces the CLI to exit with non-zero status code if the specified logging level (severity) is reached. See: https://github.com/asciidoctor/asciidoctor/pull/2674, https://github.com/asciidoctor/asciidoctor/issues/2003, https://github.com/asciidoctor/asciidoctor/issues/854It would be nice to have the same feature in AsciidoctorJ CLI, too. (To e.g. catch missing included files in CI builds)
I haven't touched AsciidoctorJ code before, but it looks like the relevant Ruby code is in https://github.com/asciidoctor/asciidoctor/blob/main/lib/asciidoctor/cli/invoker.rb , which AsciidoctorJ does not call.
Here's a quick attempt at doing what the Ruby CLI does: https://github.com/pasieronen/asciidoctorj/commit/f94d332eb7aaf468e4f1674bf650a5c3037fa095 Any thoughts on that?