From 5cda1e55e0e6c96905c1097fa6e0e8aadb3a1ab0 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sun, 6 Jul 2014 18:04:30 -0700 Subject: [PATCH] Must load universal variables earlier, and issue a barrier after erasing one. Fixes #1526 --- env.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/env.cpp b/env.cpp index c5a790eaf..abf1973e0 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);