diff --git a/src/executor/executor_child.c b/src/executor/executor_child.c index 904bedd..299b77c 100644 --- a/src/executor/executor_child.c +++ b/src/executor/executor_child.c @@ -22,7 +22,7 @@ void executor_child(t_minishell *msh, t_command *command) dup2(command->fd_out, 1); executor_close_fds(command->n_fds); path = executor_absolute_path(msh, command->args[0]); - if (path == NULL) + if (path == NULL || !access(path, F_OK | X_OK)) { ft_putstr_fd(RED BOLD, 2); ft_putstr_fd(command->args[0], 2);