1use rootcause::report;
4use ytil_sys::pico_args::Arguments;
5
6mod fix;
7
8pub fn run(mut cli_args: Arguments) -> rootcause::Result<()> {
14 let command = cli_args.subcommand()?;
15 match command.as_deref() {
16 None => {
17 if cli_args.contains("--help") || cli_args.finish().is_empty() {
18 print!("{}", include_str!("../help.txt"));
19 Ok(())
20 } else {
21 Err(report!("missing repo subcommand"))
22 }
23 }
24 Some("fix") => fix::run(cli_args),
25 Some(command) => Err(report!("unsupported repo command").attach(format!("command={command}"))),
26 }
27}