aboutsummaryrefslogtreecommitdiffhomepage
path: root/env.cpp
diff options
context:
space:
mode:
authorGravatar Kevin Ballard <kevin@sb.org>2014-10-01 12:27:32 -0700
committerGravatar Kevin Ballard <kevin@sb.org>2014-10-01 12:27:32 -0700
commit1be5e68e994b72ff60aa6221420761fe0f7271a2 (patch)
tree3da4590650aad1f62d16658ab7fdb257b7929df3 /env.cpp
parentab5b22982f1291c9482415743cc8b8cd547d49a5 (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.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/env.cpp b/env.cpp
index 2fe3767b..749c1b1b 100644
--- a/env.cpp
+++ b/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);
}