mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
nix-shell/pure: keep environment variable SHLVL
This commit is contained in:
parent
ae568847f5
commit
f628ca2a1f
1 changed files with 1 additions and 1 deletions
|
@ -394,7 +394,7 @@ int main(int argc, char ** argv)
|
|||
auto tmp = getEnv("TMPDIR", getEnv("XDG_RUNTIME_DIR", "/tmp"));
|
||||
|
||||
if (pure) {
|
||||
std::set<string> keepVars{"HOME", "USER", "LOGNAME", "DISPLAY", "PATH", "TERM", "IN_NIX_SHELL", "TZ", "PAGER", "NIX_BUILD_SHELL"};
|
||||
std::set<string> keepVars{"HOME", "USER", "LOGNAME", "DISPLAY", "PATH", "TERM", "IN_NIX_SHELL", "TZ", "PAGER", "NIX_BUILD_SHELL", "SHLVL"};
|
||||
decltype(env) newEnv;
|
||||
for (auto & i : env)
|
||||
if (keepVars.count(i.first))
|
||||
|
|
Loading…
Reference in a new issue