From 15d93d507d6da404b37649e87e65b220dbc8bce4 Mon Sep 17 00:00:00 2001 From: y-syo Date: Wed, 14 Aug 2024 10:19:08 +0200 Subject: [PATCH] =?UTF-8?q?=E3=80=8C=E2=9C=8F=EF=B8=8F=E3=80=8D=20norm:=20?= =?UTF-8?q?normed=20project.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/error_msg.h | 4 ++-- src/exec/exec_split_cmd.c | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) 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); }