MCPcopy Create free account
hub / github.com/clawshell/clawshell / cmd_stop

Function cmd_stop

src/main.rs:801–816  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

799}
800
801fn cmd_stop() -> Result<(), Box<dyn std::error::Error>> {
802 tui::print_banner("Stop");
803 ensure_default_config_migrated_if_present()?;
804 ensure_service_installed_for_lifecycle()?;
805
806 if !platform::service_is_running()? {
807 tui::print_warning("ClawShell is not running.");
808 return Ok(());
809 }
810
811 println!("Stopping ClawShell via service manager...");
812 platform::service_stop()?;
813 tui::print_success("ClawShell stopped successfully.");
814 tui::print_info("Logs", &process::log_file_path().display().to_string());
815 Ok(())
816}
817
818fn cmd_status() -> Result<(), Box<dyn std::error::Error>> {
819 tui::print_banner("Status");

Callers 1

mainFunction · 0.85

Calls 9

print_bannerFunction · 0.85
print_warningFunction · 0.85
print_successFunction · 0.85
print_infoFunction · 0.85
log_file_pathFunction · 0.70
service_is_runningFunction · 0.50
service_stopFunction · 0.50

Tested by

no test coverage detected