mirror of https://github.com/Icinga/icinga2.git
CLI: Hide "Command options" if command is null
Before this commit, if icinga2 command executed without any argument, the program will print empty "Command options". While at it, clean the whitespaces. fixes #10439 Signed-off-by: Gunnar Beutner <gunnar@beutner.name>
This commit is contained in:
parent
618e031f46
commit
977d94839b
|
@ -200,12 +200,11 @@ bool CLICommand::ParseCommand(int argc, char **argv, po::options_description& vi
|
|||
found_command:
|
||||
lock.unlock();
|
||||
|
||||
if (command) {
|
||||
po::options_description vdesc("Command options");
|
||||
|
||||
if (command)
|
||||
command->InitParameters(vdesc, hiddenDesc);
|
||||
|
||||
visibleDesc.add(vdesc);
|
||||
}
|
||||
|
||||
if (autocomplete)
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue