fix(SERVER/Main): Implementation for version param (#22707)

This commit is contained in:
SAS2000
2025-08-21 19:13:04 +02:00
committed by GitHub
parent 413178662a
commit 9d82ae97ae
2 changed files with 7 additions and 10 deletions

View File

@@ -127,7 +127,7 @@ int main(int argc, char** argv)
auto vm = GetConsoleArguments(argc, argv, configFile, configService);
// exit if help or version is enabled
if (vm.count("help"))
if (vm.count("help") || vm.count("version"))
return 0;
#if AC_PLATFORM == AC_PLATFORM_WINDOWS
@@ -733,13 +733,11 @@ variables_map GetConsoleArguments(int argc, char** argv, fs::path& configFile, [
}
if (vm.count("help"))
{
std::cout << all << "\n";
}
else if (vm.count("version"))
std::cout << GitRevision::GetFullVersion() << "\n";
else if (vm.count("dry-run"))
{
sConfigMgr->setDryRun(true);
}
return vm;
}