From 436932e5455a4a7c797f63bb4d0624980e242b94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=B4=E5=A4=A9?= Date: Wed, 11 Mar 2026 03:09:25 +0800 Subject: [PATCH] fix(ci): gate Windows-only functions with #[cfg(target_os = windows)] for Clippy --- src-tauri/Cargo.lock | 2 +- src-tauri/src/commands/service.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index b7bf1eb..7c24cc1 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -328,7 +328,7 @@ dependencies = [ [[package]] name = "clawpanel" -version = "0.7.3" +version = "0.7.4" dependencies = [ "base64 0.22.1", "chrono", diff --git a/src-tauri/src/commands/service.rs b/src-tauri/src/commands/service.rs index 6044181..94289bd 100644 --- a/src-tauri/src/commands/service.rs +++ b/src-tauri/src/commands/service.rs @@ -18,11 +18,13 @@ fn description_map() -> HashMap<&'static str, &'static str> { ]) } +#[cfg(target_os = "windows")] fn looks_like_gateway_command_line(command_line: &str) -> bool { let text = command_line.to_ascii_lowercase(); text.contains("openclaw") && text.contains("gateway") } +#[cfg(target_os = "windows")] fn parse_listening_pids_from_netstat(stdout: &str, port: u16) -> Vec { let port_pattern = format!(":{port}"); let mut pids = HashSet::new();