Merge pull request #3488 from LnL7/darwin-tmpdir

never use /var/folders for TMPDIR on darwin
This commit is contained in:
Eelco Dolstra 2020-04-12 16:23:34 +02:00 committed by GitHub
commit 512753f824
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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").value_or("/tmp"), "/var/folders/"))
if (hasPrefix(getEnv("TMPDIR").value_or("/tmp"), "/var/folders/"))
unsetenv("TMPDIR");
#endif
}