Skip to content

Commit 04ce0d8

Browse files
committed
Report when unknown config file options are ignored
1 parent 222e627 commit 04ce0d8

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/util.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -859,9 +859,13 @@ bool ArgsManager::ReadConfigStream(std::istream& stream, std::string& error, boo
859859
}
860860

861861
// Check that the arg is known
862-
if (!IsArgKnown(strKey) && !ignore_invalid_keys) {
863-
error = strprintf("Invalid configuration value %s", option.first.c_str());
864-
return false;
862+
if (!IsArgKnown(strKey)) {
863+
if (!ignore_invalid_keys) {
864+
error = strprintf("Invalid configuration value %s", option.first.c_str());
865+
return false;
866+
} else {
867+
LogPrintf("Ignoring unknown configuration value %s\n", option.first);
868+
}
865869
}
866870
}
867871
return true;

0 commit comments

Comments
 (0)