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
parent 4586319bef
commit 818652d20f
2 changed files with 16 additions and 12 deletions

View file

@ -6168,8 +6168,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;
}