mirror of
https://github.com/KeyZox71/ft_minipowershell.git
synced 2025-05-11 06:58:47 +02:00
「🔨」 fix: fixed some things.
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user