aboutsummaryrefslogtreecommitdiff
path: root/src/libmain
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-11-26 21:08:56 +0100
committerEelco Dolstra <edolstra@gmail.com>2019-11-26 21:08:56 +0100
commitabb8ef619ba2fab3ae16fb5b5430215905bac723 (patch)
tree8de25038687ae2aad30ff8f3546a55975e0e51b8 /src/libmain
parent313106d5491c7c6279f3c962348462ca04cd2e0e (diff)
Fix macOS build
https://hydra.nixos.org/build/107457009
Diffstat (limited to 'src/libmain')
-rw-r--r--src/libmain/shared.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index d3dbfbc44..81fb6b05a 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -155,7 +155,7 @@ void initNix()
sshd). This breaks build users because they don't have access
to the TMPDIR, in particular in ‘nix-store --serve’. */
#if __APPLE__
- if (getuid() == 0 && hasPrefix(getEnv("TMPDIR"), "/var/folders/"))
+ if (getuid() == 0 && hasPrefix(getEnv("TMPDIR").value_or("/tmp"), "/var/folders/"))
unsetenv("TMPDIR");
#endif
}