From: fennecdjay Date: Tue, 4 Jul 2023 09:09:27 +0000 (+0200) Subject: :art: return non zero on errors X-Git-Tag: nightly~140 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=0cb60d3afe35984479468c2c87597456adce4690;p=gwion.git :art: return non zero on errors --- diff --git a/include/gwiondata.h b/include/gwiondata.h index e1c9323b..3b0f3856 100644 --- a/include/gwiondata.h +++ b/include/gwiondata.h @@ -15,6 +15,7 @@ typedef struct GwionData_ { struct Passes_ *passes; Plugs *plugs; bool cdoc; + bool errored; } GwionData; ANN GwionData *new_gwiondata(const MemPool); diff --git a/src/main.c b/src/main.c index 2df96ebe..66a0ff70 100644 --- a/src/main.c +++ b/src/main.c @@ -88,8 +88,9 @@ int main(int argc, char **argv) { const m_bool ini = gwion_ini(&gwion, &arg); arg_release(&arg); if (ini > 0) gwion_run(&gwion); + const bool ret = gwion.data->errored; gwion_end(&gwion); gwion.vm = NULL; - exit(EXIT_SUCCESS); + return ret; } #endif