aboutsummaryrefslogtreecommitdiffhomepage
path: root/env.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-07-06 18:04:30 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-07-06 18:12:18 -0700
commit5cda1e55e0e6c96905c1097fa6e0e8aadb3a1ab0 (patch)
tree3069d05dde758b1f56cf8debbda8cb5d58feb636 /env.cpp
parent195cd130f88b68c87c8216bfda6020649181e26f (diff)
Must load universal variables earlier, and issue a barrier after erasing
one. Fixes #1526
Diffstat (limited to 'env.cpp')
-rw-r--r--env.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/env.cpp b/env.cpp
index c5a790ea..abf1973e 100644
--- a/env.cpp
+++ b/env.cpp
@@ -559,6 +559,7 @@ void env_init(const struct config_paths_t *paths /* or NULL */)
/* Set up universal variables. The empty string means to use the deafult path. */
assert(s_universal_variables == NULL);
s_universal_variables = new env_universal_t(L"");
+ s_universal_variables->load();
/*
Set up SHLVL variable
@@ -905,6 +906,10 @@ int env_remove(const wcstring &key, int var_mode)
!(var_mode & ENV_LOCAL))
{
erased = uvars() && uvars()->remove(key);
+ if (erased)
+ {
+ env_universal_barrier();
+ }
}
react_to_variable_change(key);