Skip to content

Commit

Permalink
fix worldserver version command
Browse files Browse the repository at this point in the history
  • Loading branch information
jasongdove committed Oct 1, 2024
1 parent 8712fc5 commit 89b5c09
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/server/worldserver/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,7 @@ variables_map GetConsoleArguments(int argc, char** argv, std::string& configFile
options_description all("Allowed options");
all.add_options()
("help,h", "print usage message")
("version,v", "print version build info")
("config,c", value<std::string>(&configFile)->default_value(_TRINITY_CORE_CONFIG), "use <arg> as configuration file")
;
#ifdef _WIN32
Expand All @@ -605,9 +606,14 @@ variables_map GetConsoleArguments(int argc, char** argv, std::string& configFile
std::cerr << e.what() << "\n";
}

if (vm.count("help")) {
if (vm.count("help"))
{
std::cout << all << "\n";
}
else if (vm.count("version"))
{
std::cout << GitRevision::GetFullVersion() << "\n";
}

return vm;
}

0 comments on commit 89b5c09

Please sign in to comment.