(mut options: ServiceOptions)
| 27 | } |
| 28 | |
| 29 | pub fn enable(mut options: ServiceOptions) -> anyhow::Result<()> { |
| 30 | ensure_launch_agent_supported()?; |
| 31 | preserve_or_create_credentials(&mut options); |
| 32 | if let Some(result) = reuse_running_service_if_matching(&options)? { |
| 33 | return print_install_result(&result); |
| 34 | } |
| 35 | let result = install(options)?; |
| 36 | print_install_result(&result) |
| 37 | } |
| 38 | |
| 39 | pub fn restart(mut options: ServiceOptions) -> anyhow::Result<()> { |
| 40 | ensure_launch_agent_supported()?; |
no test coverage detected