MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / get_global_config_path

Function get_global_config_path

crates/opencode-config/src/loader.rs:261–271  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

259}
260
261fn 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.

Callers 3

load_globalMethod · 0.85
update_global_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected