fix: ast_redir and ast_assignment accorded for every part

This commit is contained in:
matteo 2026-01-29 18:46:11 +01:00
parent e0032dd991
commit 98d18eef7d
8 changed files with 39 additions and 22 deletions

View file

@ -354,7 +354,7 @@ static int builtin_cd(char **argv, struct hash_map *vars)
}
}
// char *pwd = getcwd("", "");
char *pwd = get_var_or_env(pwd, "PWD");
char *pwd = get_var_or_env(vars, "PWD");
if (chdir(path) != 0)
{
perror("cd");