Fix ignored config file. Fixes issue #1276.

This commit is contained in:
Patrick Niklaus 2014-11-18 00:43:38 +01:00
parent c3f9dc7400
commit 7658031784

View File

@ -395,6 +395,13 @@ bool Prepare::ParseArguments(int argc, char *argv[])
.run(),
option_variables);
const auto& temp_config_path = option_variables["config"].as<boost::filesystem::path>();
if (boost::filesystem::is_regular_file(temp_config_path))
{
boost::program_options::store(boost::program_options::parse_config_file<char>(temp_config_path.c_str(), cmdline_options, true),
option_variables);
}
if (option_variables.count("version"))
{
SimpleLogger().Write() << g_GIT_DESCRIPTION;