about summary refs log tree commit diff
path: root/src/nix-build
diff options
context:
space:
mode:
authorStefan Junker <steveeJ@users.noreply.github.com>2017-03-12T00·04+0100
committerGitHub <noreply@github.com>2017-03-12T00·04+0100
commitf628ca2a1f6a4d2bbaa0d24204fad8fe530e375a (patch)
treef45200a1380f671faaf35a8220de7e795f004c3c /src/nix-build
parentae568847f5ee2dfd4226f30fa64fdc122623229b (diff)
nix-shell/pure: keep environment variable SHLVL
Diffstat (limited to 'src/nix-build')
-rwxr-xr-xsrc/nix-build/nix-build.cc2
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))