From 9859b248fffa1575ab3e8e9eb207580748b45e02 Mon Sep 17 00:00:00 2001 From: Carter Li Date: Wed, 7 Oct 2026 14:06:56 +0800 Subject: [PATCH] Platform: prefers the passwd shell over $SHELL --- src/common/impl/FFPlatform_unix.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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); }