update: should handle built-in variables

This commit is contained in:
maix0 2024-10-06 14:37:54 +02:00
parent b058348d35
commit d459a8b8dc
11 changed files with 81 additions and 24 deletions

View file

@ -6,7 +6,7 @@
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/09/14 12:31:28 by maiboyer #+# #+# */
/* Updated: 2024/09/16 18:28:48 by maiboyer ### ########.fr */
/* Updated: 2024/10/06 14:22:08 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
@ -26,6 +26,7 @@ t_error _run_cmd(t_ast_node self, t_state *state, int *out)
if (cmd_res.process.stderr != NULL)
close_fd(cmd_res.process.stderr);
*out = cmd_res.exit;
state->last_exit = *out;
return (NO_ERROR);
}
@ -54,6 +55,7 @@ t_error _run_other(t_ast_node self, t_state *state, int *out)
return (ERROR);
*out = subshell_res.exit;
}
state->last_exit = *out;
return (NO_ERROR);
}