Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI should exit with non-zero status when e.g. missing include files #1113

Closed
pasieronen opened this issue Sep 2, 2022 · 1 comment · Fixed by #1114
Closed

CLI should exit with non-zero status when e.g. missing include files #1113

pasieronen opened this issue Sep 2, 2022 · 1 comment · Fixed by #1114

Comments

@pasieronen
Copy link
Contributor

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: asciidoctor/asciidoctor#2674, asciidoctor/asciidoctor#2003, asciidoctor/asciidoctor#854

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?

@robertpanzer
Copy link
Member

Thanks, this is a great start.
Do you want to open a PR?
Then we can continue discussing on that..

robertpanzer added a commit that referenced this issue Sep 9, 2022
Add --failure-level command line option to force non-zero exit code (fixes #1113)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants