We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9dc522 commit 79e715aCopy full SHA for 79e715a
lib/src/cli.rs
@@ -903,10 +903,14 @@ impl Opt {
903
let first: OsString = first.into();
904
let argv0 = callname_from_argv0(&first);
905
tracing::debug!("argv0={argv0:?}");
906
- if argv0 == InternalsOpts::GENERATOR_BIN {
907
- let base_args = ["bootc", "internals", "systemd-generator"]
908
- .into_iter()
909
- .map(OsString::from);
+ let mapped = match argv0 {
+ InternalsOpts::GENERATOR_BIN => {
+ Some(["bootc", "internals", "systemd-generator"].as_slice())
+ }
910
+ _ => None,
911
+ };
912
+ if let Some(base_args) = mapped {
913
+ let base_args = base_args.into_iter().map(OsString::from);
914
return Opt::parse_from(base_args.chain(args.map(|i| i.into())));
915
}
916
Some(first)
0 commit comments