aboutsummaryrefslogtreecommitdiff
path: root/src/builtin/exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/builtin/exit.c')
-rw-r--r--src/builtin/exit.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/builtin/exit.c b/src/builtin/exit.c
index 860325e..3f1d843 100644
--- a/src/builtin/exit.c
+++ b/src/builtin/exit.c
@@ -6,7 +6,7 @@
/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/04/01 17:10:16 by charles #+# #+# */
-/* Updated: 2020/07/17 16:36:03 by charles ### ########.fr */
+/* Updated: 2020/07/19 19:12:46 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -33,16 +33,12 @@ int builtin_exit(char **argv, t_env env)
after++;
if (*after != '\0' || errno == ERANGE)
{
- // replace with minishell error system
- ft_putstr_fd("minishell: exit: ", STDERR_FILENO);
- ft_putstr_fd(argv[1], STDERR_FILENO);
- ft_putstr_fd(": numeric argument required\n", STDERR_FILENO);
+ errorf("exit: %s: numeric argument required\n", argv[1]);
return 2;
}
if (argv[2] != NULL)
{
- // replace with minishell error system
- ft_putendl_fd("minishell: exit: too many arguments", STDERR_FILENO);
+ errorf("exit: too many arguments\n");
return 1;
}
}