Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mkosi $command --help should not run the actual command #3165

Open
davide125 opened this issue Nov 3, 2024 · 1 comment
Open

mkosi $command --help should not run the actual command #3165

davide125 opened this issue Nov 3, 2024 · 1 comment
Labels

Comments

@davide125
Copy link
Contributor

mkosi commit the issue has been seen with

main

Used host distribution

Fedora Linux 41

Used target distribution

Fedora Linux 41

Linux kernel version used

No response

CPU architectures issue was seen on

None

Unexpected behaviour you saw

When inside a mkosi config, running mkosi burn --help will immediately attempt to burn, instead of printing something. Likewise for mkosi qemu --help or any other similar invocation.

Used mkosi config

No response

mkosi output

With a valid config:

$ mkosi burn --help
‣ Burning 🔥🔥🔥 to medium…

Without a valid config:

$ mkosi burn --help
‣ Image 'default' has not been built yet
‣ (Make sure to build the image first with 'mkosi build' or use '--force')
@davide125 davide125 added the bug label Nov 3, 2024
@behrmann
Copy link
Contributor

behrmann commented Nov 3, 2024

That's unfortunately an artifact of how our commandline parsing works, since mkosi options come before verbs everything after the verb is an option for that verb if the verb takes a cmdline.

We should probably specialcase that for our verbs that don't take arguments and support -h/--help there, to alleviate that footgun.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants