diff --git a/src-tauri/src/commands/misc.rs b/src-tauri/src/commands/misc.rs index b1dcc3f9..b4dd12d9 100644 --- a/src-tauri/src/commands/misc.rs +++ b/src-tauri/src/commands/misc.rs @@ -657,6 +657,7 @@ fn scan_cli_version(tool: &str) -> (Option, Option) { (None, Some("not installed or not executable".to_string())) } +#[cfg(target_os = "windows")] fn wsl_distro_for_tool(tool: &str) -> Option { let override_dir = match tool { "claude" => crate::settings::get_claude_override_dir(), @@ -694,12 +695,6 @@ fn wsl_distro_from_path(path: &Path) -> Option { } } -/// 非 Windows 平台不支持 WSL 路径解析 -#[cfg(not(target_os = "windows"))] -fn wsl_distro_from_path(_path: &Path) -> Option { - None -} - /// 打开指定提供商的终端 /// /// 根据提供商配置的环境变量启动一个带有该提供商特定设置的终端