mirror of
https://github.com/NixOS/nix.git
synced 2025-02-16 17:02:28 +00: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.
(cherry picked from commit b9e7f5aa2d
)
This commit is contained in:
parent
1a336bf865
commit
c1f69dfc5e
@ -457,8 +457,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 New Issue
Block a user