cd ok et appel a path dans export

This commit is contained in:
hugogogo
2021-11-26 00:00:00 +01:00
parent 32eab95d48
commit 3465354af5
3 changed files with 16 additions and 5 deletions

View File

@@ -26,6 +26,8 @@ int builtin_export(int argc, char *argv[], t_all *c)
if (environ[env_position] == '\0')
environ = ft_resize_2d_arr(environ, 1);
environ[env_position] = ft_strdup(argv[1]);
if (!ft_strncmp(var[0], "PATH", 4 + 1))
c->path = retrieve_path(environ);
// free var
return (0);
}