mirror of
https://github.com/NixOS/nix.git
synced 2025-12-06 00:51:00 +01:00
Merge pull request #7918 from zimbatm/fix-empty-nix-store-env
treat empty NIX_STORE_DIR env vars as unset
This commit is contained in:
commit
0507462c06
4 changed files with 17 additions and 8 deletions
|
|
@ -2062,7 +2062,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(getEnv("TMPDIR").value_or("/tmp"), true);
|
||||
Path globalTmpDir = canonPath(getEnvNonEmpty("TMPDIR").value_or("/tmp"), true);
|
||||
|
||||
/* They don't like trailing slashes on subpath directives */
|
||||
if (globalTmpDir.back() == '/') globalTmpDir.pop_back();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue