()
| 217 | } |
| 218 | |
| 219 | pub fn kill_installed() -> anyhow::Result<Vec<u32>> { |
| 220 | ensure_launch_agent_supported()?; |
| 221 | let domain = launchctl_domain()?; |
| 222 | let killed = unload_existing_services(&domain)?; |
| 223 | for path in service_plist_paths()? { |
| 224 | if path.exists() { |
| 225 | fs::remove_file(&path).with_context(|| format!("remove {}", path.display()))?; |
| 226 | } |
| 227 | } |
| 228 | Ok(killed) |
| 229 | } |
| 230 | |
| 231 | fn launch_agent_supported() -> bool { |
| 232 | cfg!(target_os = "macos") |
no test coverage detected