mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-28 07:44:06 +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) {
|
static void getUserShell(FFPlatform* platform, const struct passwd* pwd) {
|
||||||
const char* shell = getenv("SHELL");
|
const char* shell = pwd ? pwd->pw_shell : getenv("SHELL");
|
||||||
if (!ffStrSet(shell) && pwd) {
|
|
||||||
shell = pwd->pw_shell;
|
|
||||||
}
|
|
||||||
|
|
||||||
ffStrbufAppendS(&platform->userShell, shell);
|
ffStrbufAppendS(&platform->userShell, shell);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user