()
| 259 | } |
| 260 | |
| 261 | fn get_global_config_path() -> PathBuf { |
| 262 | let config_dir = if cfg!(target_os = "macos") { |
| 263 | dirs::config_dir().unwrap_or_else(|| PathBuf::from("~/.config")) |
| 264 | } else if cfg!(target_os = "windows") { |
| 265 | dirs::config_dir().unwrap_or_else(|| PathBuf::from("%APPDATA%")) |
| 266 | } else { |
| 267 | dirs::config_dir().unwrap_or_else(|| PathBuf::from("~/.config")) |
| 268 | }; |
| 269 | |
| 270 | config_dir.join("opencode/opencode") |
| 271 | } |
| 272 | |
| 273 | /// Migrate legacy global TOML config (`~/.config/opencode/config`) into |
| 274 | /// `opencode.json` and merge it into the currently loaded config. |
no outgoing calls
no test coverage detected