fix: ast_redir and ast_assignment accorded for every part
This commit is contained in:
parent
e0032dd991
commit
98d18eef7d
8 changed files with 39 additions and 22 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue