Skip to content

cmp: return from parse_params on --help instead of exiting - #432

Open
qodelicious wants to merge 1 commit into
uutils:mainfrom
qodelicious:cmp-help-no-exit
Open

qodelicious wants to merge 1 commit into
uutils:mainfrom
qodelicious:cmp-help-no-exit

Conversation

@qodelicious

Copy link
Copy Markdown
Contributor

cmp::parse_params called process::exit(0) when it saw --help, which killed the whole process for any caller, including the fuzz target (which had to filter --help out).

It now sets a help flag on Params and returns. cmp::main prints the usage and exits 0 as before, so cmp --help behaves the same. The --help filter in fuzz_cmp_args is removed, and there are unit and integration tests for the help path.

Closes #220

Assisted-by: AI coding assistant

Return a help flag to the caller and print usage in main. Remove the fuzzing exclusion and cover help parsing and command output.

Assisted-by: AI coding assistant
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cmp::parse_params exits the process on --help instead of returning

1 participant