Skip to content

ufat: take -h after -- as an argument - #3

Merged
brauner merged 1 commit into
mainfrom
cli-help
Nov 12, 2026
Merged

brauner merged 1 commit into
mainfrom
cli-help

Conversation

@brauner

@brauner brauner commented Nov 12, 2026

Copy link
Copy Markdown
Member

run() looked for -h and --help in all arguments before the command got
to parse them. So ufat manifest -- -h printed the usage instead of
the manifest of the directory -h, and -h as the value of an option, as
in --size -h, did the same. Every command parses its arguments with
Args::parse() first, which knows where the options end, so leave a -h
after the command to it.

run() looked for -h and --help in all arguments before the command got
to parse them. So `ufat manifest -- -h` printed the usage instead of
the manifest of the directory -h, and -h as the value of an option, as
in --size -h, did the same. Every command parses its arguments with
Args::parse() first, which knows where the options end, so leave a -h
after the command to it.

Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
@brauner
brauner merged commit 43ddb47 into main Nov 12, 2026
22 of 23 checks passed
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.

1 participant