print correct command output

This commit is contained in:
Quinten Mennen 2025-02-26 18:36:45 +01:00
parent 5b3d446b75
commit 11b19749f0

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* executor_child.c :+: :+: */
/* +:+ */
/* By: willem <willem@student.codam.nl> +#+ */
/* +#+ */
/* ::: :::::::: */
/* executor_child.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: qmennen <qmennen@student.codam.nl> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/12 21:25:10 by willem #+# #+# */
/* Updated: 2025/02/26 16:09:44 by whaffman ######## odam.nl */
/* Updated: 2025/02/26 18:20:34 by qmennen ### ########.fr */
/* */
/* ************************************************************************** */
@ -21,11 +21,11 @@ void executor_child(t_minishell *msh, t_command *command)
if (command->fd_out != 1)
dup2(command->fd_out, 1);
executor_close_fds(command->n_fds);
path = executor_absolute_path(msh, command->command);
path = executor_absolute_path(msh, command->args[0]);
if (path == NULL)
{
ft_putstr_fd(RED BOLD, 2);
ft_putstr_fd(command->command, 2);
ft_putstr_fd(command->args[0], 2);
ft_putstr_fd(": " RESET "command not found\n", 2);
return ;
}