help and version commands return code 0 (success)

This commit is contained in:
olszomal 2021-06-07 10:36:34 +02:00 committed by Michał Trojnara
parent 64e7e26eba
commit 95d77c9b98

View File

@ -6015,7 +6015,9 @@ err_cleanup:
free_options(&options); free_options(&options);
if (ret) if (ret)
ERR_print_errors_fp(stdout); ERR_print_errors_fp(stdout);
if (cmd != CMD_HELP) if (cmd == CMD_HELP)
ret = 0; /* OK */
else
printf(ret ? "Failed\n" : "Succeeded\n"); printf(ret ? "Failed\n" : "Succeeded\n");
return ret; return ret;
} }