Skip to content

Commit

Permalink
Merge pull request #3488 from LnL7/darwin-tmpdir
Browse files Browse the repository at this point in the history
never use /var/folders for TMPDIR on darwin
  • Loading branch information
edolstra committed Apr 12, 2020
2 parents ea2148f + 4d9db42 commit 512753f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libmain/shared.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 512753f

Please sign in to comment.