()
| 623 | |
| 624 | #[tokio::main] |
| 625 | async fn main() -> Result<(), Box<dyn std::error::Error>> { |
| 626 | ensure_rustls_crypto_provider()?; |
| 627 | |
| 628 | let cli = Cli::parse(); |
| 629 | |
| 630 | match cli.command { |
| 631 | Commands::Start { config, foreground } => cmd_start(&config, foreground).await?, |
| 632 | Commands::Stop => cmd_stop()?, |
| 633 | Commands::Status => cmd_status()?, |
| 634 | Commands::Restart { config } => cmd_restart(&config).await?, |
| 635 | Commands::Logs { |
| 636 | level, |
| 637 | filter, |
| 638 | num, |
| 639 | follow, |
| 640 | } => cmd_logs(level, filter, num, follow).await?, |
| 641 | Commands::Config { config, edit } => cmd_config(&config, edit)?, |
| 642 | Commands::MigrateConfig { |
| 643 | config, |
| 644 | on_ambiguous, |
| 645 | } => cmd_migrate_config(&config, on_ambiguous)?, |
| 646 | Commands::Onboard => cmd_onboard()?, |
| 647 | Commands::Uninstall { yes } => cmd_uninstall(yes)?, |
| 648 | Commands::Version => cmd_version(), |
| 649 | } |
| 650 | |
| 651 | Ok(()) |
| 652 | } |
| 653 | |
| 654 | async fn cmd_start(config_path: &str, foreground: bool) -> Result<(), Box<dyn std::error::Error>> { |
| 655 | tui::print_banner("Start"); |
nothing calls this directly
no test coverage detected