error message instead of putstrfd

This commit is contained in:
Quinten Mennen 2025-02-27 16:46:34 +01:00
parent dd76e2c521
commit abdab3156c

View File

@ -6,7 +6,7 @@
/* By: qmennen <qmennen@student.codam.nl> +#+ +:+ +#+ */ /* By: qmennen <qmennen@student.codam.nl> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/12 21:25:10 by willem #+# #+# */ /* Created: 2025/02/12 21:25:10 by willem #+# #+# */
/* Updated: 2025/02/27 16:20:00 by qmennen ### ########.fr */ /* Updated: 2025/02/27 16:46:21 by qmennen ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -37,9 +37,7 @@ void executor_child(t_minishell *msh, t_command *command)
path = executor_absolute_path(msh, command->args[0]); path = executor_absolute_path(msh, command->args[0]);
if (path == NULL || access(path, F_OK | X_OK) != 0) if (path == NULL || access(path, F_OK | X_OK) != 0)
{ {
ft_putstr_fd(RED BOLD, 2); error_msg("minishell", "command not found");
ft_putstr_fd(command->args[0], 2);
ft_putstr_fd(": " RESET "command not found\n", 2);
return ; return ;
} }
if (is_dir(path)) if (is_dir(path))