mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 09:12:11 +08:00
Fix for issue where we compute a default USER variable, but never set
its value.
This commit is contained in:
parent
89069fdaa4
commit
b2c78dbd57
5
env.cpp
5
env.cpp
@ -299,7 +299,6 @@ static bool var_is_locale(const wcstring &key)
|
||||
static void handle_locale()
|
||||
{
|
||||
const env_var_t lc_all = env_get_string(L"LC_ALL");
|
||||
int i;
|
||||
const wcstring old_locale = wsetlocale(LC_MESSAGES, NULL);
|
||||
|
||||
/*
|
||||
@ -330,7 +329,7 @@ static void handle_locale()
|
||||
wsetlocale(LC_ALL, lang.c_str());
|
||||
}
|
||||
|
||||
for (i=2; locale_variable[i]; i++)
|
||||
for (int i=2; locale_variable[i]; i++)
|
||||
{
|
||||
const env_var_t val = env_get_string(locale_variable[i]);
|
||||
|
||||
@ -479,7 +478,7 @@ static void env_set_defaults()
|
||||
if (pw->pw_name != NULL)
|
||||
{
|
||||
const wcstring wide_name = str2wcstring(pw->pw_name);
|
||||
env_set(L"USER", NULL, ENV_GLOBAL);
|
||||
env_set(L"USER", wide_name.c_str(), ENV_GLOBAL);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user