diff options
author | Kevin Ballard <kevin@sb.org> | 2014-10-01 12:27:32 -0700 |
---|---|---|
committer | Kevin Ballard <kevin@sb.org> | 2014-10-01 12:27:32 -0700 |
commit | 1be5e68e994b72ff60aa6221420761fe0f7271a2 (patch) | |
tree | 3da4590650aad1f62d16658ab7fdb257b7929df3 /env.cpp | |
parent | ab5b22982f1291c9482415743cc8b8cd547d49a5 (diff) |
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).
Diffstat (limited to 'env.cpp')
-rw-r--r-- | env.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); } |