mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-23 12:26:59 +01:00
Revert "Command line arguments '--version' and '--help' return exit code 0 instead of 255"
This reverts commit bfdfdac24b
.
This commit is contained in:
parent
e12997ed02
commit
2efb934953
@ -470,9 +470,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
||||
packed_data->add_pack_source(zip_packed_data);
|
||||
#endif
|
||||
|
||||
// Default exit code, can be modified for certain errors.
|
||||
Error exit_code = ERR_INVALID_PARAMETER;
|
||||
|
||||
I = args.front();
|
||||
while (I) {
|
||||
#ifdef OSX_ENABLED
|
||||
@ -489,12 +486,10 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
||||
if (I->get() == "-h" || I->get() == "--help" || I->get() == "/?") { // display help
|
||||
|
||||
show_help = true;
|
||||
exit_code = OK;
|
||||
goto error;
|
||||
|
||||
} else if (I->get() == "--version") {
|
||||
print_line(get_full_version_string());
|
||||
exit_code = OK;
|
||||
goto error;
|
||||
|
||||
} else if (I->get() == "-v" || I->get() == "--verbose") { // verbose output
|
||||
@ -1307,7 +1302,7 @@ error:
|
||||
OS::get_singleton()->finalize_core();
|
||||
locale = String();
|
||||
|
||||
return exit_code;
|
||||
return ERR_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
Error Main::setup2(Thread::ID p_main_tid_override) {
|
||||
|
Loading…
Reference in New Issue
Block a user