mirror of
https://github.com/NixOS/nix.git
synced 2025-11-12 05:26:02 +01:00
fix: Treat empty TMPDIR as unset
Fixes an instance of
nix: src/libutil/util.cc:139: nix::Path nix::canonPath(PathView, bool): Assertion `path != ""' failed.
... which I've been getting in one of my shells for some reason.
I have yet to find out why TMPDIR was empty, but it's no reason for
Nix to break.
(cherry picked from commit c3fb2aa1f9)
This commit is contained in:
parent
8e75ad1995
commit
1a336bf865
4 changed files with 25 additions and 4 deletions
17
src/libutil/file-system.hh
Normal file
17
src/libutil/file-system.hh
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#pragma once
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* Utiltities for working with the file sytem and file paths.
|
||||
*/
|
||||
|
||||
#include "types.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
/**
|
||||
* Return `TMPDIR`, or the default temporary directory if unset or empty.
|
||||
*/
|
||||
Path defaultTempDir();
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue