From 5b72287b31e568a94d6829bc52053384faf9f082 Mon Sep 17 00:00:00 2001 From: lucaspalomodevelop Date: Wed, 25 Oct 2023 21:12:32 +0200 Subject: [PATCH] add command_namespace var --- src/commands.hpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/commands.hpp b/src/commands.hpp index 0913d9d..3954002 100644 --- a/src/commands.hpp +++ b/src/commands.hpp @@ -20,18 +20,14 @@ namespace commands void add() { std::cout << command.getCurrentCommand().name << std::endl; + std::string command_namespace = "default"; if (command.existsArg("-n", "--namespace")) { - std::cout << "namespace: " << command.getArg("-n", "--namespace") << std::endl; + command_namespace = command.getArg("-n", "--namespace"); } - else - { - std::cout << "namespace: " - << "default" << std::endl; - } - // throw NotImplementedException(); + std::cout << "namespace: " << command_namespace << std::endl; } void list()