diff --git a/src/common/impl/FFPlatform_unix.c b/src/common/impl/FFPlatform_unix.c index 94a73f5de..45e79543f 100644 --- a/src/common/impl/FFPlatform_unix.c +++ b/src/common/impl/FFPlatform_unix.c @@ -299,10 +299,7 @@ static void getHostName(FFPlatform* platform, const struct utsname* uts) { } static void getUserShell(FFPlatform* platform, const struct passwd* pwd) { - const char* shell = getenv("SHELL"); - if (!ffStrSet(shell) && pwd) { - shell = pwd->pw_shell; - } + const char* shell = pwd ? pwd->pw_shell : getenv("SHELL"); ffStrbufAppendS(&platform->userShell, shell); }