From 0cb60d3afe35984479468c2c87597456adce4690 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Tue, 4 Jul 2023 11:09:27 +0200 Subject: [PATCH] :art: return non zero on errors --- include/gwiondata.h | 1 + src/main.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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 -- 2.43.0