context_wrap options are allowed only at start

This commit is contained in:
Maxime Coste 2013-04-17 19:10:06 +02:00
parent d3961768ec
commit 21f487417b

View File

@ -532,7 +532,7 @@ template<typename Func>
void context_wrap(const CommandParameters& params, Context& context, Func func)
{
ParametersParser parser(params, { { "client", true }, { "draft", false }},
ParametersParser::Flags::None, 1);
ParametersParser::Flags::OptionsOnlyAtStart, 1);
Context& real_context = parser.has_option("client") ?
ClientManager::instance().get_client(parser.option_value("client")).context()