update: fixed not setting exitcode on failed cmd

This commit is contained in:
Maieul BOYER 2024-10-12 17:25:02 +02:00
parent f9c0e93e55
commit d2897626b6
No known key found for this signature in database

View file

@ -6,7 +6,7 @@
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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);
}