aboutsummaryrefslogtreecommitdiff
path: root/src/error.c
diff options
context:
space:
mode:
authorDominik Kaiser2025-01-25 15:42:11 +0100
committerDominik Kaiser2025-01-25 15:42:11 +0100
commit21874e1446ccd08f4433870a69dbe1c08f8331a9 (patch)
treee0d92a277fbb353167ff7909a2007f669058b5bc /src/error.c
parentb427100b6c0c655f74dc689533a3f36edfeebffc (diff)
downloadminishell-21874e1446ccd08f4433870a69dbe1c08f8331a9.tar.gz
minishell-21874e1446ccd08f4433870a69dbe1c08f8331a9.zip
Make norminette happy
Diffstat (limited to 'src/error.c')
-rw-r--r--src/error.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/error.c b/src/error.c
index 2ca60b2..eebc21a 100644
--- a/src/error.c
+++ b/src/error.c
@@ -6,7 +6,7 @@
/* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/01/15 16:35:53 by dkaiser #+# #+# */
-/* Updated: 2025/01/20 18:12:40 by dkaiser ### ########.fr */
+/* Updated: 2025/01/25 14:58:52 by dkaiser ### ########.fr */
/* */
/* ************************************************************************** */
@@ -22,9 +22,14 @@ void *error(int err_code, char *err_text, int exit_code, int *ret_code)
return (NULL);
}
-void command_not_found_error(char *cmd)
+void *command_not_found_error(char *cmd, int *return_code, char *cmd_path,
+ char **split_path)
{
ft_printf("%s:", cmd);
ft_putstr_fd(" command not found", 2);
ft_printf("\n");
+ *return_code = 127;
+ free(cmd_path);
+ ft_free_split(split_path);
+ return (NULL);
}