mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-25 13:45:03 +08:00
feat(settings): prioritize native install path for Claude Code detection
- Move ~/.local/bin to first position in version scan search paths - Update one-click install commands to use official native installation (curl script) instead of npm for Claude Code
This commit is contained in:
@@ -295,10 +295,10 @@ fn scan_cli_version(tool: &str) -> (Option<String>, Option<String>) {
|
||||
|
||||
let home = dirs::home_dir().unwrap_or_default();
|
||||
|
||||
// 常见的 npm 全局安装路径
|
||||
// 常见的安装路径(原生安装优先)
|
||||
let mut search_paths: Vec<std::path::PathBuf> = vec![
|
||||
home.join(".local/bin"), // Native install (official recommended)
|
||||
home.join(".npm-global/bin"),
|
||||
home.join(".local/bin"),
|
||||
home.join("n/bin"), // n version manager
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user