mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
Export $HOME if we have to calculate it
If $HOME is unset in the environment, fish calculates it with getpwnam(). However, it wasn't being exported. Just like the $USER calculation, $HOME should probably be exported, because everyone will assume that it's an environment variable (as opposed to an unexported global variable).
This commit is contained in:
parent
ab5b22982f
commit
1be5e68e99
1 changed files with 1 additions and 1 deletions
2
env.cpp
2
env.cpp
|
@ -562,7 +562,7 @@ void env_init(const struct config_paths_t *paths /* or NULL */)
|
|||
if (pw->pw_dir != NULL)
|
||||
{
|
||||
const wcstring dir = str2wcstring(pw->pw_dir);
|
||||
env_set(L"HOME", dir.c_str(), ENV_GLOBAL);
|
||||
env_set(L"HOME", dir.c_str(), ENV_GLOBAL | ENV_EXPORT);
|
||||
}
|
||||
free(unam_narrow);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue