]> granicus.if.org Git - icinga2/commitdiff
Remove usage info from --version
authorGunnar Beutner <gunnar@beutner.name>
Thu, 18 Dec 2014 04:28:51 +0000 (05:28 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Thu, 18 Dec 2014 04:28:51 +0000 (05:28 +0100)
fixes #8102

icinga-app/icinga.cpp

index 64c9585ae264e8f416ddf91d30ffb4ebabd54a7f..b060a39d92ab182a95a33f36c5afb75cec2e13ff 100644 (file)
@@ -274,13 +274,15 @@ int Main(void)
                                appName = appName.SubStr(3, appName.GetLength() - 3);
 
                        std::cout << appName << " " << "- The Icinga 2 network monitoring daemon (version: "
+                           << ConsoleColorTag(vm.count("version") ? Console_ForegroundRed : Console_Normal)
                            << Application::GetVersion()
 #ifdef _DEBUG
                            << "; debug"
 #endif /* _DEBUG */
+                           << ConsoleColorTag(Console_Normal)
                            << ")" << std::endl << std::endl;
 
-                       if (!command || vm.count("help")) {
+                       if ((!command || vm.count("help")) && !vm.count("version")) {
                                std::cout << "Usage:" << std::endl
                                    << "  " << argv[0] << " ";