1
0
Fork 0
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:
Eelco Dolstra 2023-03-03 13:49:56 +01:00 committed by GitHub
commit 0507462c06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 8 deletions

View file

@ -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();