mirror of
https://github.com/NixOS/nix
synced 2024-09-19 10:50:24 -04:00
local-derivation-goal.cc: Reuse defaultTempDir()
(cherry picked from commit fd31945742
)
This commit is contained in:
parent
c1f69dfc5e
commit
28fc0e4f58
|
@ -2116,7 +2116,7 @@ void LocalDerivationGoal::runChild()
|
|||
|
||||
/* The tmpDir in scope points at the temporary build directory for our derivation. Some packages try different mechanisms
|
||||
to find temporary directories, so we want to open up a broader place for them to dump their files, if needed. */
|
||||
Path globalTmpDir = canonPath(getEnvNonEmpty("TMPDIR").value_or("/tmp"), true);
|
||||
Path globalTmpDir = canonPath(defaultTempDir(), true);
|
||||
|
||||
/* They don't like trailing slashes on subpath directives */
|
||||
if (globalTmpDir.back() == '/') globalTmpDir.pop_back();
|
||||
|
|
Loading…
Reference in a new issue