Commit 047ee29b authored by abenoit's avatar abenoit
Browse files

exit Nan error

parent 8c848d77
......@@ -30,6 +30,7 @@ enum e_retcode
HOME_NOT_SET,
CD_ARG_ERR,
EXIT_ARG_ERR,
EXIT_NAN,
_PARSING_ERROR_,
SQUOTE_MISSING,
DQUOTE_MISSING,
......
......@@ -20,8 +20,7 @@ int ft_exit(char **args, t_xe *xe)
else // "exit NaN"
{
xe->stat_loc = 2;
printf("exit: bad argument\n");
return (FT_EXIT);//another error, to print like bash
return (EXIT_NAN);//another error, to print like bash
}
}
}
......
......@@ -28,7 +28,8 @@ int exec_error(int err_code, t_xe *xe)
"HOME not set",
"cd: too many arguments",
//"pwd : erreur de détermination du répertoire actuel : getcwd : ne peut accéder aux répertoires parents : Aucun fichier ou dossier de ce type",// -> moved to err_output
"exit: too many arguments"};
"exit: too many arguments",
"exit: bad argument"};
ft_putstr_fd("command error: ", STDERR_FILENO);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment