Merge pull request #83664 from turbohz/fix-error-code-255-version-help
[3.x] Server: Return exit code 0 when running --version or --help
This commit is contained in:
commit
b40cea8fd4
|
@ -35,8 +35,12 @@ int main(int argc, char *argv[]) {
|
|||
OS_Server os;
|
||||
|
||||
Error err = Main::setup(argv[0], argc - 1, &argv[1]);
|
||||
if (err != OK)
|
||||
if (err != OK) {
|
||||
if (err == ERR_HELP) { // Returned by --help and --version, so success.
|
||||
return 0;
|
||||
}
|
||||
return 255;
|
||||
}
|
||||
|
||||
if (Main::start())
|
||||
os.run(); // it is actually the OS that decides how to run
|
||||
|
|
Loading…
Reference in New Issue