-
Notifications
You must be signed in to change notification settings - Fork 210
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
feat: add cli modifications of the system requirements #2765
feat: add cli modifications of the system requirements #2765
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a useful addition @ruben-arts!
Apart from my comments, I would also like to see an integration test, testing the CLI
let (version, family) = args | ||
.version | ||
.split_once(' ') | ||
.ok_or_else(|| { | ||
miette::miette!("Invalid version and family string. Expected format: <version> <family>, e.g. '2.17 libc'") | ||
})?; | ||
|
||
let version = version.parse().into_diagnostic().wrap_err( | ||
"Invalid version string, expected format: <version> <family>, e.g. '2.17 libc'", | ||
)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By shifting this logic to clap
, --help
and completions will be much more useful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed this
Why?
We want to work towards more automation around the system requirements. Most likely, a part of that is automated serialization for the manifest. This is a preparation for that. And secondly, it's better to have CLI options for DX and especially for tutorial.
Feature
Allows users to run:
TODO:
system-requirements remove
: Not in this prsystem-requirements list