use std::process::ExitCode;
use agent_infra_cli::Cli;
use clap::Parser;
#[tokio::main]
async fn main() -> ExitCode {
let cli = Cli::parse();
let format = cli.output;
match cli.execute().await {
Ok(output) => match output.render(format) {
Ok(rendered) => {
println!("{rendered}");
ExitCode::SUCCESS
}
Err(error) => {
eprintln!("infra: {error:#}");
ExitCode::FAILURE
}
},
Err(error) => {
eprintln!("infra: {error:#}");
ExitCode::FAILURE
}
}
}