Skip to content

utils: Only consider dot data processing fail if dot returns non-zero

Xi Ruoyao requested to merge xry111/gi-docgen:xry111/dot-errorcode into main

dot can output some warnings but still generate the svg output. For example, when Graphviz is not built with Pango or the system has no font installed, dot can complain

Warning: no hard-coded metrics for 'sans-serif'

but still generate the svg. The return code of dot allows us to distinguish errors and warnings, so we can stop treating warnings as hard errors.

I've checked the visualized class hierarchy graphs of glib-2.80.0 with this change applied to gi-docgen, and a Graphviz built w/o Pango. The graphs still look fine.

Fixes #188.

Merge request reports