diff --git a/source/cli/main.cpp b/source/cli/main.cpp index 72ecb91..af56a24 100644 --- a/source/cli/main.cpp +++ b/source/cli/main.cpp @@ -8,6 +8,11 @@ int main(int argc, char** argv) return 1; } + if (flags["version"]) { + print_version(); + return 0; + } + if (flags["help"]) { print_help(); return 0; @@ -170,8 +175,8 @@ int main(int argc, char** argv) bool parse_param(int argc, char** argv, std::unordered_map& options, std::unordered_map& flags) { - std::unordered_set allowed_param = { "control", "device", "tasks", "init", "help" }; - std::unordered_set flags_key = { "init", "help" }; + std::unordered_set allowed_param = { "control", "device", "tasks", "init", "help", "version" }; + std::unordered_set flags_key = { "init", "help", "version" }; for (auto& key : flags_key) { flags[key] = false; }