diff options
-rw-r--r-- | src/s_init.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/s_init.c b/src/s_init.c index 7bf03f7..d277984 100644 --- a/src/s_init.c +++ b/src/s_init.c @@ -95,6 +95,7 @@ t_msh msh->vars = NULL; msh->cwd = NULL; if ((msh->cwd = u_get_var_value("$PWD", msh)) == NULL) + msh->cwd = getcwd(NULL, 0); inc_shlvl(msh); return (msh); } |