mirror of
https://github.com/godotengine/godot.git
synced 2025-10-30 05:01:10 +00:00
Fix exit code of --help and --version, and test them in CI
Corrects prior regression which caused ERROR output and exit code of 1.
This commit is contained in:
parent
a2459c7d35
commit
d38d76d039
9 changed files with 24 additions and 4 deletions
|
|
@ -691,12 +691,12 @@ 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;
|
||||
exit_code = ERR_HELP; // Hack to force an early exit in `main()` with a success code.
|
||||
goto error;
|
||||
|
||||
} else if (I->get() == "--version") {
|
||||
print_line(get_full_version_string());
|
||||
exit_code = OK;
|
||||
exit_code = ERR_HELP; // Hack to force an early exit in `main()` with a success code.
|
||||
goto error;
|
||||
|
||||
} else if (I->get() == "-v" || I->get() == "--verbose") { // verbose output
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue