diff --git a/utils/ft_get_executable.c b/utils/ft_get_executable.c index 60976ee..fa06552 100644 --- a/utils/ft_get_executable.c +++ b/utils/ft_get_executable.c @@ -34,7 +34,10 @@ char *ft_get_executable_without_path(t_list **env, const char *name) path = NULL; paths = get_value_by_key("PATH", env); if (paths == NULL) - path = ""; + { + ft_eprintf("minishell: %s: command not found\n", name); + return (NULL); + } tab = ft_split(paths, ':'); if (tab == NULL) {