mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-27 23:30:47 +01:00
Platform: prefers the passwd shell over $SHELL
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user