From af8aaf5badb1f0986a6e21f23939983bb4b9fddc Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 18 Dec 2014 05:28:51 +0100 Subject: [PATCH] Remove usage info from --version fixes #8102 --- icinga-app/icinga.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/icinga-app/icinga.cpp b/icinga-app/icinga.cpp index 64c9585ae..b060a39d9 100644 --- a/icinga-app/icinga.cpp +++ b/icinga-app/icinga.cpp @@ -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] << " "; -- 2.40.0