Exit with 0 in JSON-format if everything else works

This commit is contained in:
Lorenz Kästle 2025-02-19 11:49:43 +01:00
parent 5acd14fcfb
commit 24172ca0e0

View file

@ -413,6 +413,10 @@ void mp_print_output(mp_check check) { puts(mp_fmt_output(check)); }
*/
void mp_exit(mp_check check) {
mp_print_output(check);
if (check.format == MP_FORMAT_TEST_JSON) {
exit(0);
}
exit(mp_compute_check_state(check));
}