adrianvlupu / C4-Builder

This is a documentation builder. You feed it .md and .puml and it exports a site, pdf, or a markdown with navigation.
https://adrianvlupu.github.io/C4-Builder/
MIT License
563 stars 93 forks source link

Using `"generateLocalImages": true` fails without error when server URL is bad #33

Open dvrensk opened 3 years ago

dvrensk commented 3 years ago

I encountered this when trying out the C4Builder-Demo. Since I was trying out something new, I was expecting problems and wasn't too thrown off, but we're setting up this to be used by all developers on our projects, an error message would be really helpful.

Steps to reproduce

  1. Install c4builder
  2. Clone C4Builder-Demo && cd C4Builder-Demo
  3. Copy pdf.css as per https://github.com/adrianvlupu/C4Builder-Demo/issues/1
  4. Make sure .c4builder has "plantumlServerUrl": "https://www.plantuml.com/plantuml",, using https instead of the supported http
  5. rm -rf docs && c4builder

Expected result

docs/context.png should be a valid PNG.

Actual result

docs/context.png is 0 bytes, and there is no error message. This is the output from running:

$ rm -rf docs && c4builder
       _  _   _           _ _     _           
   ___| || | | |__  _   _(_) | __| | ___ _ __ 
  / __| || |_| '_ \| | | | | |/ _` |/ _ \ '__|
 | (__|__   _| |_) | |_| | | | (_| |  __/ |   
  \___|  |_| |_.__/ \__,_|_|_|\__,_|\___|_|   

Blow up your software documentation writing skills

building documentation in ./docs
parsed 7 folders
generating images
processed 8/8 images
generating markdown files
processed 7/7 files
generating docsify site
generating complete pdf file
built in 6.945 seconds

to view the generated website run
> c4builder site