From 07fdebdbb02fde71d6e656ddd46b967347417502 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 9 Jul 2018 09:48:07 +0200 Subject: Implement publish command for publishing packages to archive repositories --- bdep/types-parsers.cxx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'bdep/types-parsers.cxx') diff --git a/bdep/types-parsers.cxx b/bdep/types-parsers.cxx index 6b92d8e..c93424a 100644 --- a/bdep/types-parsers.cxx +++ b/bdep/types-parsers.cxx @@ -10,6 +10,28 @@ namespace bdep { namespace cli { + void parser:: + parse (url& x, bool& xs, scanner& s) + { + const char* o (s.next ()); + + if (!s.more ()) + throw missing_value (o); + + const char* v (s.next ()); + + try + { + x = url (v); + } + catch (const invalid_argument& e) + { + throw invalid_value (o, v, e.what ()); + } + + xs = true; + } + template static void parse_path (T& x, scanner& s) -- cgit v1.1