mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 22:16:16 +02:00
fixup: use same style as getEnv
This commit is contained in:
parent
b96d9c1687
commit
dc8820c71f
1 changed files with 2 additions and 5 deletions
|
@ -56,11 +56,8 @@ std::optional<std::string> getEnv(const std::string & key)
|
|||
|
||||
std::optional<std::string> getEnvNonEmpty(const std::string & key) {
|
||||
auto value = getEnv(key);
|
||||
if (value == "") {
|
||||
return std::nullopt;
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
if (value == "") return {};
|
||||
return value;
|
||||
}
|
||||
|
||||
std::map<std::string, std::string> getEnv()
|
||||
|
|
Loading…
Reference in a new issue