diff --git a/include/error_msg.h b/include/error_msg.h index 6b5cebc..e46a0f7 100644 --- a/include/error_msg.h +++ b/include/error_msg.h @@ -6,7 +6,7 @@ /* By: adjoly +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/05/20 20:25:06 by adjoly #+# #+# */ -/* Updated: 2024/07/16 14:32:44 by adjoly ### ########.fr */ +/* Updated: 2024/08/14 10:17:33 by mmoussou ### ########.fr */ /* */ /* ************************************************************************** */ @@ -23,7 +23,7 @@ # define ERROR_NO_EOF "need delimiter to heredoc" # define ERROR_NO_FILE "No such file or directory" # define ERROR_CMD_PIPE "No command after pipe" -# define ERROR_NO_CMD "command not found" +# define ERROR_NO_CMD "minishell : command not found: " # define ERROR_COREDUMP "(core dumped)" diff --git a/src/exec/exec_split_cmd.c b/src/exec/exec_split_cmd.c index fc8d952..9781494 100644 --- a/src/exec/exec_split_cmd.c +++ b/src/exec/exec_split_cmd.c @@ -6,7 +6,7 @@ /* By: mmoussou cmd, input)) { if (exec.status == -1) - get_exit_code(127); - if (exec.status == -1) - printf("minishell : command not found: %s\n", input); + ft_printf("%s%s\n", ERROR_NO_CMD, input, get_exit_code(127)); free(input); return (-1); }