diff options
Diffstat (limited to 'src/s_init.c')
-rw-r--r-- | src/s_init.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/s_init.c b/src/s_init.c index 377cd91..a0ea9a3 100644 --- a/src/s_init.c +++ b/src/s_init.c @@ -86,12 +86,11 @@ t_msh if (!(msh->shname = ft_strdup(argv[0]))) return (NULL); /* TODO: shname: care about "./", try with symlinks */ - msh->cwd = NULL; - msh->cwd = getcwd(NULL, 0); - /* TODO: handle getcwd failed */ msh->envp = NULL; if (!(msh->envp = dupenv(envp))) return (NULL); + msh->cwd = NULL; + msh->cwd = u_get_var_value("$PWD", msh); msh->ret = 0; init_buptr(msh); msh->curr = NULL; |