diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-04-12 16:23:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-12 16:23:34 +0200 |
commit | 512753f8247b927b62fd9391ee5ba6dda29ea4d4 (patch) | |
tree | 0610e08fd4d3e380afc1d0e6853b9f12cf000d8d /src/libmain | |
parent | ea2148f47cbea8d309ab2c1bed54899dcf36c14c (diff) | |
parent | 4d9db420ffc9bd48da107a61c093b0d65d9d8db1 (diff) |
Merge pull request #3488 from LnL7/darwin-tmpdir
never use /var/folders for TMPDIR on darwin
Diffstat (limited to 'src/libmain')
-rw-r--r-- | src/libmain/shared.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index d41e772e9..72ba717e5 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").value_or("/tmp"), "/var/folders/")) + if (hasPrefix(getEnv("TMPDIR").value_or("/tmp"), "/var/folders/")) unsetenv("TMPDIR"); #endif } |