mirror of
https://github.com/NixOS/nix.git
synced 2024-11-22 06:42:28 +00:00
fixup: use same style as getEnv
This commit is contained in:
parent
b96d9c1687
commit
dc8820c71f
@ -56,12 +56,9 @@ std::optional<std::string> getEnv(const std::string & key)
|
|||||||
|
|
||||||
std::optional<std::string> getEnvNonEmpty(const std::string & key) {
|
std::optional<std::string> getEnvNonEmpty(const std::string & key) {
|
||||||
auto value = getEnv(key);
|
auto value = getEnv(key);
|
||||||
if (value == "") {
|
if (value == "") return {};
|
||||||
return std::nullopt;
|
|
||||||
} else {
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
std::map<std::string, std::string> getEnv()
|
std::map<std::string, std::string> getEnv()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user