mirror of https://github.com/fairyglade/ly.git
Only set envvar if it was already set
This commit is contained in:
parent
4ee2b3ecc7
commit
fb8fb7b22d
|
|
@ -220,7 +220,11 @@ void env_init(struct passwd* pwd)
|
||||||
setenv("SHELL", pwd->pw_shell, 1);
|
setenv("SHELL", pwd->pw_shell, 1);
|
||||||
setenv("USER", pwd->pw_name, 1);
|
setenv("USER", pwd->pw_name, 1);
|
||||||
setenv("LOGNAME", pwd->pw_name, 1);
|
setenv("LOGNAME", pwd->pw_name, 1);
|
||||||
setenv("LANG", lang ? lang : "C", 1);
|
|
||||||
|
if (lang)
|
||||||
|
{
|
||||||
|
setenv("LANG", lang, 1);
|
||||||
|
}
|
||||||
|
|
||||||
// Set PATH if specified in the configuration
|
// Set PATH if specified in the configuration
|
||||||
if (strlen(config.path))
|
if (strlen(config.path))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue