fix: -p exits with failure if there are parse failures

This commit is contained in:
Lin Xianyi 2026-02-07 12:12:13 +08:00 committed by DreamMaoMao
parent 0d413a5503
commit ebd83d8e13
2 changed files with 16 additions and 12 deletions

View file

@ -6123,8 +6123,7 @@ int32_t main(int32_t argc, char *argv[]) {
} else if (c == 'c') {
cli_config_path = optarg;
} else if (c == 'p') {
parse_config();
return EXIT_SUCCESS;
return parse_config() ? EXIT_SUCCESS : EXIT_FAILURE;
} else {
goto usage;
}