fixup: use same style as getEnv

This commit is contained in:
Jonas Chevalier 2023-03-03 11:34:36 +01:00
parent b96d9c1687
commit dc8820c71f
No known key found for this signature in database
GPG key ID: 71BAF6D40C1D63D7

View file

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