fix: no env is now workable
This commit is contained in:
parent
f5940ee99e
commit
96696243d0
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user