diff options
author | Stefan Junker <steveeJ@users.noreply.github.com> | 2017-03-12T00·04+0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-12T00·04+0100 |
commit | f628ca2a1f6a4d2bbaa0d24204fad8fe530e375a (patch) | |
tree | f45200a1380f671faaf35a8220de7e795f004c3c | |
parent | ae568847f5ee2dfd4226f30fa64fdc122623229b (diff) |
nix-shell/pure: keep environment variable SHLVL
-rwxr-xr-x | src/nix-build/nix-build.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc index b81c98868e61..b4206033cf5f 100755 --- a/src/nix-build/nix-build.cc +++ b/src/nix-build/nix-build.cc @@ -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)) |