about summary refs log tree commit diff
path: root/src/nix-build
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2017-03-20T16·38+0100
committerGitHub <noreply@github.com>2017-03-20T16·38+0100
commitdc931fe1cd6e426bbb8392872a10f3b308ed008a (patch)
tree3f3ee44e9f183197d11d692cdf9a68094cf7ae53 /src/nix-build
parent558eda01154d47b3c88983576eedb582185b2201 (diff)
parentf628ca2a1f6a4d2bbaa0d24204fad8fe530e375a (diff)
Merge pull request #1275 from steveeJ/patch-1
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))