mirror of
https://github.com/NixOS/nix
synced 2025-06-29 19:03:16 +02:00
getEnv(): Return std::optional
This allows distinguishing between an empty value and no value.
This commit is contained in:
parent
fd900c45b5
commit
ba87b08f85
17 changed files with 60 additions and 63 deletions
|
@ -66,7 +66,7 @@ public:
|
|||
/* File name of the socket the daemon listens to. */
|
||||
Path nixDaemonSocketFile;
|
||||
|
||||
Setting<std::string> storeUri{this, getEnv("NIX_REMOTE", "auto"), "store",
|
||||
Setting<std::string> storeUri{this, getEnv("NIX_REMOTE").value_or("auto"), "store",
|
||||
"The default Nix store to use."};
|
||||
|
||||
Setting<bool> keepFailed{this, false, "keep-failed",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue