summaryrefslogtreecommitdiffstats
path: root/src/s_init.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-08-04 16:05:01 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-08-04 16:05:01 +0200
commit308cadbf0934975575b6a5e4e38bbaa7aa103edd (patch)
tree1b3e8f002c1777571bb24212841d92b1aa536a66 /src/s_init.c
parentsec (diff)
download42-minishell-308cadbf0934975575b6a5e4e38bbaa7aa103edd.tar.gz
42-minishell-308cadbf0934975575b6a5e4e38bbaa7aa103edd.tar.bz2
42-minishell-308cadbf0934975575b6a5e4e38bbaa7aa103edd.tar.xz
42-minishell-308cadbf0934975575b6a5e4e38bbaa7aa103edd.tar.zst
42-minishell-308cadbf0934975575b6a5e4e38bbaa7aa103edd.zip
later
Diffstat (limited to '')
-rw-r--r--src/s_init.c1
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);
}