mirror of
https://github.com/NixOS/nix
synced 2025-06-26 20:01:15 +02: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
|
@ -39,6 +39,10 @@ extern const std::string nativeSystem;
|
|||
/* Return an environment variable. */
|
||||
std::optional<std::string> getEnv(const std::string & key);
|
||||
|
||||
/* Return a non empty environment variable. Returns nullopt if the env
|
||||
variable is set to "" */
|
||||
std::optional<std::string> getEnvNonEmpty(const std::string & key);
|
||||
|
||||
/* Get the entire environment. */
|
||||
std::map<std::string, std::string> getEnv();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue