Update src/libutil/util.cc

Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
This commit is contained in:
Jonas Chevalier 2023-03-02 16:17:20 +01:00 committed by GitHub
parent 25300c0ecd
commit 72e1e23051
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,9 +58,7 @@ std::optional<std::string> getEnvNonEmpty(const std::string & key) {
auto value = getEnv(key);
if (value == "") {
// TODO: determine whether this should be a warning or an error.
logWarning({
.msg = hintfmt("ignoring the '%1%' env variable, its value has been set to \"\"", key)
});
warn("ignoring the '%1%' env variable, its value has been set to \"\"", key);
return std::nullopt;
} else {
return value;