🔨」 fix: fixed some things.

This commit is contained in:
y-syo
2024-08-13 17:06:47 +02:00
parent 9112518459
commit c16d60bf1c
4 changed files with 11 additions and 9 deletions

View File

@ -6,7 +6,7 @@
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/14 13:46:57 by adjoly #+# #+# */
/* Updated: 2024/07/29 12:13:37 by mmoussou ### ########.fr */
/* Updated: 2024/08/13 17:01:12 by mmoussou ### ########.fr */
/* */
/* ************************************************************************** */
@ -37,7 +37,7 @@ void exit_args_handler(char **argv, int ac, char **env_array, t_env *env)
if (ac > 2)
{
printf("minishell: exit: too many arguments\n");
ft_printf_fd(2, "minishell: exit: too many arguments\n");
get_exit_code(1);
return ;
}
@ -59,7 +59,8 @@ void ft_exit(char **argv, int ac, char **env_array, t_env *env)
if (check_exit_value(argv[1])
|| (ft_atoi(argv[1]) % 10 != ft_atol(argv[1]) % 10))
{
printf("minishell: exit: %s: numeric argument required\n", argv[1]);
ft_printf_fd(2,
"minishell: exit: %s: numeric argument required\n", argv[1]);
free_exit(env, env_array);
exit(2);
}