()
| 219 | } |
| 220 | |
| 221 | pub async fn run_cli() -> Result<()> { |
| 222 | rustls::crypto::ring::default_provider() |
| 223 | .install_default() |
| 224 | .map_err(|e| miette::miette!("failed to install rustls crypto provider: {e:?}"))?; |
| 225 | |
| 226 | let matches = command().get_matches(); |
| 227 | let cli = Cli::from_arg_matches(&matches).expect("clap validated args"); |
| 228 | |
| 229 | match cli.command { |
| 230 | Some(Commands::GenerateCerts(args)) => certgen::run(args).await, |
| 231 | None => Box::pin(run_from_args(cli.run, matches)).await, |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | fn prepare_server_config(args: &mut RunArgs, matches: &ArgMatches) -> Result<ServerStartupConfig> { |
| 236 | // Load TOML when explicitly requested, or from the default XDG location |
no test coverage detected