mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
fix: Treat empty XDG_RUNTIME_DIR as unset
See preceding commit. Not observed in the wild, but is sensible and consistent with TMPDIR behavior.
This commit is contained in:
parent
c3fb2aa1f9
commit
b9e7f5aa2d
1 changed files with 3 additions and 2 deletions
|
@ -475,8 +475,9 @@ static void main_nix_build(int argc, char * * argv)
|
|||
// Set the environment.
|
||||
auto env = getEnv();
|
||||
|
||||
auto tmp = getEnv("TMPDIR");
|
||||
if (!tmp || tmp->empty()) tmp = getEnv("XDG_RUNTIME_DIR").value_or("/tmp");
|
||||
auto tmp = getEnvNonEmpty("TMPDIR");
|
||||
if (!tmp)
|
||||
tmp = getEnvNonEmpty("XDG_RUNTIME_DIR").value_or("/tmp");
|
||||
|
||||
if (pure) {
|
||||
decltype(env) newEnv;
|
||||
|
|
Loading…
Reference in a new issue