mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-08-10 16:37:34 +00:00
The guard added earlier could never trigger. tools/render_mermaid.py has no nonzero exit path — its own docstring said "Exits 0 even if some/all fail (non-fatal)" — so `if ! render_mermaid.py ...; then exit 1; fi` never ran its body, and a build that rendered zero diagrams still passed. Reproduced by running the script with no Chrome on PATH: it printed the fallback warning and exited 0. Adds a --strict flag that exits 1 when Chrome is missing or any diagram fails to render, and passes it from every workflow invocation. The default stays lenient so local mobile-reader builds keep working, which is what the exit-0 behaviour was actually for. Verified both directions: with no Chrome, --strict exits 1 and the default exits 0; against the real book with Chrome, --strict renders every diagram and exits 0.