tomtom-international / asciidoxy

AsciiDoxy generates API documentation from Doxygen XML output to AsciiDoc.
Apache License 2.0
31 stars 10 forks source link

Asciidoxy doesn't fail if asciidoctor fails underneath #54

Closed RobertGernert-TomTom closed 2 years ago

RobertGernert-TomTom commented 2 years ago

If I have an input file "missing-include.adoc"

= A heading
[source,cpp]
----
include::something-that-doesnt-exist.cpp[tag=a]
----

and run asciidoxy missing-include.adoc --build-dir build --destination-dir build/output && echo "still there" I get something like


    ___              _ _ ____             0.8.0
   /   |  __________(_|_) __ \____  _  ____  __
  / /| | / ___/ ___/ / / / / / __ \| |/_/ / / /
 / ___ |(__  ) /__/ / / /_/ / /_/ />  </ /_/ /
/_/  |_/____/\___/_/_/_____/\____/_/|_|\__, /
                                      /____/

Preparing work directory: 100%|███████████████████████████| 1/1 [00:00<00:00, 463.82pkg/s]
Processing asciidoc     : 100%|████████████████████████████| 2/2 [00:00<00:00, 397.87file/s]
Running asciidoctor     :   0%|                                                                                            | 0/1 [00:00<?, ?file/s]asciidoctor: 
ERROR: .asciidoxy.framework-http.adoc: line 6: include file not found: /Users/gernert/Downloads/bug/build/intermediate/something-that-doesnt-exist.cpp
Running asciidoctor     : 100%|█████████████████████████████| 1/1 [00:00<00:00,  4.78file/s]
Copying images          : 100%|██████████████████████████████| 1/1 [00:00<00:00, 4169.29pkg/s]
still there

Asciidoctor complains about the missing file. The call to asciidoxy succeeds and I get "still there" at the end of the output.

silvester747 commented 2 years ago

This requires passing --failure-level ERROR to the AsciiDoctor CLI. Right now, AsciiDoctor has switched to using the API instead of the CLI. I need to figure out how to replicate this behavior.