mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 03:11:28 +00:00
Fix command exit codes
This commit is contained in:
parent
a54d92d078
commit
084e9b7a35
@ -77,7 +77,7 @@ namespace EQEmuCommand {
|
|||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!arguments_filled || argc == 2) {
|
if (!arguments_filled || argc == 2 || cmd[{"-h", "--help"}]) {
|
||||||
std::string arguments_string;
|
std::string arguments_string;
|
||||||
for (auto &arg : arguments) {
|
for (auto &arg : arguments) {
|
||||||
arguments_string += " " + arg;
|
arguments_string += " " + arg;
|
||||||
@ -101,7 +101,7 @@ namespace EQEmuCommand {
|
|||||||
|
|
||||||
std::cout << command_string.str() << std::endl;
|
std::cout << command_string.str() << std::endl;
|
||||||
|
|
||||||
exit(1);
|
exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,11 +188,11 @@ namespace EQEmuCommand {
|
|||||||
|
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
|
|
||||||
std::exit(1);
|
std::exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ran_command) {
|
if (ran_command) {
|
||||||
std::exit(1);
|
std::exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -223,10 +223,6 @@ namespace WorldserverCommandHandler {
|
|||||||
{
|
{
|
||||||
description = "Dumps server database tables";
|
description = "Dumps server database tables";
|
||||||
|
|
||||||
if (cmd[{"-h", "--help"}]) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<std::string> arguments = {};
|
std::vector<std::string> arguments = {};
|
||||||
std::vector<std::string> options = {
|
std::vector<std::string> options = {
|
||||||
"--all",
|
"--all",
|
||||||
@ -245,7 +241,7 @@ namespace WorldserverCommandHandler {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
if (argc < 3) {
|
if (argc < 3 || cmd[{"-h", "--help"}]) {
|
||||||
EQEmuCommand::ValidateCmdInput(arguments, options, cmd, argc, argv);
|
EQEmuCommand::ValidateCmdInput(arguments, options, cmd, argc, argv);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user