From d2897626b6f812ff592a2720041235a69b043600 Mon Sep 17 00:00:00 2001 From: Maieul BOYER Date: Sat, 12 Oct 2024 17:25:02 +0200 Subject: [PATCH] update: fixed not setting exitcode on failed cmd --- sources/_helper_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sources/_helper_main.c b/sources/_helper_main.c index 30ffdcef..8db6376b 100644 --- a/sources/_helper_main.c +++ b/sources/_helper_main.c @@ -6,7 +6,7 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/09/06 16:31:41 by rparodi #+# #+# */ -/* Updated: 2024/10/12 16:48:46 by maiboyer ### ########.fr */ +/* Updated: 2024/10/12 17:24:28 by maiboyer ### ########.fr */ /* */ /* ************************************************************************** */ @@ -66,7 +66,10 @@ void exec_shcat(t_state *state) } if (state->ast != NULL && run_program(&state->ast->data.program, state, &prog_res)) + { printf("Error when execting the Command \n"); + state->last_exit = 127; + } ast_free(state->ast); }