On Mac, if graphviz is needed but not installed, even adding -failsafe2 doesn't make plantuml fail. Testing shows that there's an error log but error code is 0:
➜ scripts git:(master) ✗ java -jar ./plantuml.jar -nometadata -failfast2 -tpng 2023genderharmony.plantuml
java.io.IOException: Cannot run program "/opt/local/bin/dot": error=2, No such file or directory
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
at java.base/java.lang.Runtime.exec(Runtime.java:615)
at net.sourceforge.plantuml.dot.ProcessRunner$MainThread.startThreads(ProcessRunner.java:160)
at net.sourceforge.plantuml.dot.ProcessRunner$MainThread.runJob(ProcessRunner.java:120)
at net.sourceforge.plantuml.api.TimeoutExecutor$MyThread.run(TimeoutExecutor.java:76)
Caused by: java.io.IOException: error=2, No such file or directory
at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:314)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
... 5 more
java.io.IOException: Cannot run program "/opt/local/bin/dot": error=2, No such file or directory
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
at java.base/java.lang.Runtime.exec(Runtime.java:615)
at net.sourceforge.plantuml.dot.ProcessRunner$MainThread.startThreads(ProcessRunner.java:160)
at net.sourceforge.plantuml.dot.ProcessRunner$MainThread.runJob(ProcessRunner.java:120)
at net.sourceforge.plantuml.api.TimeoutExecutor$MyThread.run(TimeoutExecutor.java:76)
Caused by: java.io.IOException: error=2, No such file or directory
at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:314)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
... 5 more
➜ scripts git:(master) ✗ echo $?
0
I presume this is a bug - this should return a non-zero value