diff --git a/src/shell_manager.cc b/src/shell_manager.cc index 56ab1904..5a6e48a9 100644 --- a/src/shell_manager.cc +++ b/src/shell_manager.cc @@ -110,8 +110,12 @@ String ShellManager::pipe(const String& input, if (env_var != m_env_vars.end()) { - String value = env_var->second(name, context); - setenv(("kak_" + name).c_str(), value.c_str(), 1); + try + { + String value = env_var->second(name, context); + setenv(("kak_" + name).c_str(), value.c_str(), 1); + } + catch (runtime_error&) {} } }