From fb2bc5efbf36e3b20bf01289d4eb2652f0505222 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 30 Oct 2014 18:21:15 +0100 Subject: [PATCH] Cli: Fix choices in agent setup wizard refs #7465 --- lib/cli/agentwizardcommand.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/cli/agentwizardcommand.cpp b/lib/cli/agentwizardcommand.cpp index db9c1ed8c..df79c56a9 100644 --- a/lib/cli/agentwizardcommand.cpp +++ b/lib/cli/agentwizardcommand.cpp @@ -94,9 +94,10 @@ int AgentWizardCommand::Run(const boost::program_options::variables_map& vm, con boost::algorithm::to_lower(answer); - if (Utility::Match("^n*", answer)) - is_agent_setup = false; + String choice = answer; + if (choice.Contains("n")) + is_agent_setup = false; if (is_agent_setup) { /* agent setup part */ @@ -168,9 +169,10 @@ wizard_endpoint_loop_start: boost::algorithm::to_lower(answer); - if (Utility::Match("^y*", answer)) - goto wizard_endpoint_loop_start; + String choice = answer; + if (choice.Contains("y") || choice.Contains("j")) + goto wizard_endpoint_loop_start; std::cout << "Please specify the master connection for auto-signing:\n";