1use rootcause::report;
4use ytil_sys::pico_args::Arguments;
5
6mod repo;
7
8#[ytil_sys::main]
9fn main() -> rootcause::Result<()> {
10 let mut cli_args = Arguments::from_env();
11 let command = cli_args.subcommand()?;
12 match command.as_deref() {
13 None => {
14 if cli_args.contains("--help") || cli_args.finish().is_empty() {
15 print!("{}", include_str!("../help.txt"));
16 } else {
17 return Err(report!("unsupported frs command"));
18 }
19 }
20 Some("repo") => repo::run(cli_args)?,
21 Some(command) => return Err(report!("unsupported frs command").attach(format!("command={command}"))),
22 }
23 Ok(())
24}