From 7658031784c425289de8d5db222436f12b61779d Mon Sep 17 00:00:00 2001 From: Patrick Niklaus Date: Tue, 18 Nov 2014 00:43:38 +0100 Subject: [PATCH] Fix ignored config file. Fixes issue #1276. --- Contractor/Prepare.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Contractor/Prepare.cpp b/Contractor/Prepare.cpp index 75daf4b39..bfcc4aca1 100644 --- a/Contractor/Prepare.cpp +++ b/Contractor/Prepare.cpp @@ -395,6 +395,13 @@ bool Prepare::ParseArguments(int argc, char *argv[]) .run(), option_variables); + const auto& temp_config_path = option_variables["config"].as(); + if (boost::filesystem::is_regular_file(temp_config_path)) + { + boost::program_options::store(boost::program_options::parse_config_file(temp_config_path.c_str(), cmdline_options, true), + option_variables); + } + if (option_variables.count("version")) { SimpleLogger().Write() << g_GIT_DESCRIPTION;