update: fixed not setting exitcode on failed cmd
This commit is contained in:
parent
f9c0e93e55
commit
d2897626b6
1 changed files with 4 additions and 1 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/09/06 16:31:41 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,
|
if (state->ast != NULL && run_program(&state->ast->data.program, state,
|
||||||
&prog_res))
|
&prog_res))
|
||||||
|
{
|
||||||
printf("Error when execting the Command \n");
|
printf("Error when execting the Command \n");
|
||||||
|
state->last_exit = 127;
|
||||||
|
}
|
||||||
ast_free(state->ast);
|
ast_free(state->ast);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue