Merge pull request #3984 from hercules-ci/backport-darwin-tmp-dir-3488

never use /var/folders for TMPDIR on darwin (2.3 backport)
This commit is contained in:
Eelco Dolstra 2020-09-02 15:46:25 +02:00 committed by GitHub
commit 682694e03a
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"), "/var/folders/"))
if (hasPrefix(getEnv("TMPDIR"), "/var/folders/"))
unsetenv("TMPDIR");
#endif
}