aboutsummaryrefslogtreecommitdiffstats
path: root/src/cli/argparse.h
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-03-27 09:23:30 -0400
committerJack Lloyd <[email protected]>2018-03-27 09:23:30 -0400
commit2344c35f3ccd199e07df164f706782557ea25bcb (patch)
tree20dbf68f3d4a5ee4edeabcc434de8017f7d5ea33 /src/cli/argparse.h
parentf1c44e92bcc00d814a48876405fcb87bac9f11c0 (diff)
Support other list args in argument parser
Diffstat (limited to 'src/cli/argparse.h')
-rw-r--r--src/cli/argparse.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/cli/argparse.h b/src/cli/argparse.h
index 1b61d8676..bd8c50689 100644
--- a/src/cli/argparse.h
+++ b/src/cli/argparse.h
@@ -96,11 +96,10 @@ size_t Argument_Parser::get_arg_sz(const std::string& opt_name) const
std::vector<std::string> Argument_Parser::get_arg_list(const std::string& what) const
{
- if(what != m_spec_rest)
- {
- throw CLI_Error("Unexpected list name '" + what + "'");
- }
- return m_user_rest;
+ if(what == m_spec_rest)
+ return m_user_rest;
+
+ return Botan::split_on(get_arg(what), ',');
}
void Argument_Parser::parse_args(const std::vector<std::string>& params)