check if the path found is executable
This commit is contained in:
parent
3b1ad5500b
commit
90678d8f0f
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user