diff options
author | Robert Hensing <robert@roberthensing.nl> | 2023-02-01 17:35:28 +0100 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2023-04-07 16:24:18 +0200 |
commit | 52d6ce6515ff1e8462b67b2adb1942477ce122f8 (patch) | |
tree | 4be6fc7642d5f0ef37824ae61c18e3109397a4dc /src/libmain/shared.cc | |
parent | e706ffa007120249deace149dc4ba7cacf2c8beb (diff) |
Move macOS TMPDIR hack from initNix to initLibStore
This code is bad. We shouldn't unset variables in programs whose
children may need them. Fixing one issue at a time, so postponing.
See https://github.com/NixOS/nix/issues/7731
Part of an effort to make it easier to initialize the right things,
by moving code into the appropriate libraries.
Diffstat (limited to 'src/libmain/shared.cc')
-rw-r--r-- | src/libmain/shared.cc | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index cbd80756e..2a7e09e65 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -169,14 +169,6 @@ void initNix() gettimeofday(&tv, 0); srandom(tv.tv_usec); - /* On macOS, don't use the per-session TMPDIR (as set e.g. by - sshd). This breaks build users because they don't have access - to the TMPDIR, in particular in ‘nix-store --serve’. */ -#if __APPLE__ - if (hasPrefix(getEnv("TMPDIR").value_or("/tmp"), "/var/folders/")) - unsetenv("TMPDIR"); -#endif - } |