fix: "echo $" works
This commit is contained in:
@ -54,10 +54,10 @@ char *ft_get_executable_without_path(t_data *data, const char *name)
|
||||
if (path == NULL)
|
||||
{
|
||||
ft_eprintf("minishell: malloc failed\n");
|
||||
break;
|
||||
break ;
|
||||
}
|
||||
if (access(path, X_OK) == 0)
|
||||
break;
|
||||
break ;
|
||||
free(path);
|
||||
path = NULL;
|
||||
i++;
|
||||
@ -74,7 +74,7 @@ char *ft_get_executable_without_path(t_data *data, const char *name)
|
||||
char *ft_get_executable(t_data *data, const char *name)
|
||||
{
|
||||
char *path;
|
||||
|
||||
|
||||
if (name[0] == '.' || name[0] == '/')
|
||||
path = ft_get_executable_with_path(data, name);
|
||||
else
|
||||
|
@ -29,8 +29,7 @@ void ft_strshift(char *str, int shift);
|
||||
char *ft_quote_remover(char *str);
|
||||
int ft_atoi_check(const char *nptr);
|
||||
char *ft_get_executable(t_data *data, const char *name);
|
||||
void ft_closer(int fds[2]);
|
||||
void ft_add_fd(int fds[2], int fd);
|
||||
|
||||
void ft_closer(int fds[2]);
|
||||
void ft_add_fd(int fds[2], int fd);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user