fix: add #[cfg(target_os = "windows")] to WSL helper functions to eliminate dead_code warnings

This commit is contained in:
Jason
2026-02-24 16:25:22 +08:00
parent bb3130cbe0
commit b98c3ddb29

View File

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