aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c
index d8f9dba34..e8a1e853c 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -15764,7 +15764,10 @@ int ash_main(int argc UNUSED_PARAM, char **argv)
15764 15764
15765#if ENABLE_PLATFORM_MINGW32 15765#if ENABLE_PLATFORM_MINGW32
15766 if (!dirarg) { 15766 if (!dirarg) {
15767 chdir(xgetpwuid(getuid())->pw_dir); 15767 hp = lookupvar("HOME");
15768 if (hp == NULL || *hp == '\0')
15769 hp = xgetpwuid(getuid())->pw_dir;
15770 chdir(hp);
15768 setpwd(NULL, 0); 15771 setpwd(NULL, 0);
15769 } 15772 }
15770#endif 15773#endif