From c841de152aea824ea7abaf3d6c27d63988aa9604 Mon Sep 17 00:00:00 2001 From: Mike Sul Date: Fri, 18 Sep 2020 13:44:05 +0300 Subject: [PATCH] aktualizr-get: fix the issue with param check - Remove checking "command" option - Make "--url/-u" mandatory Signed-off-by: Mike Sul --- src/aktualizr_get/main.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/aktualizr_get/main.cc b/src/aktualizr_get/main.cc index b793643b36..d787859429 100644 --- a/src/aktualizr_get/main.cc +++ b/src/aktualizr_get/main.cc @@ -12,7 +12,7 @@ namespace bpo = boost::program_options; void check_info_options(const bpo::options_description &description, const bpo::variables_map &vm) { - if (vm.count("help") != 0 || (vm.count("command") == 0 && vm.count("version") == 0)) { + if (vm.count("help") != 0 || (vm.count("url") == 0 && vm.count("version") == 0)) { std::cout << description << '\n'; exit(EXIT_SUCCESS); } @@ -31,9 +31,9 @@ bpo::variables_map parse_options(int argc, char **argv) { description.add_options() ("help,h", "print usage") ("version,v", "Current aktualizr-get version") - ("config,c", bpo::value >()->composing(), "configuration file or directory") + ("config,c", bpo::value >()->composing(), "configuration file or directory, by default /var/sota") ("loglevel", bpo::value(), "set log level 0-5 (trace, debug, info, warning, error, fatal)") - ("url,u", bpo::value(), "url to get"); + ("url,u", bpo::value(), "url to get, mandatory"); // clang-format on bpo::variables_map vm;