MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / global_config_dir

Function global_config_dir

atomic-config/src/lib.rs:421–423  ·  view source on GitHub ↗

Get the global configuration directory. Resolution order: 1. The `ATOMIC_CONFIG_DIR` environment variable, if set — used verbatim as the config directory (the one containing `config.toml`). This lets tests isolate the global config on every platform, and lets users relocate it. 2. `dirs::home_dir()/.atomic` (the default). The variable is read at call time so it can be set and restored per test (

()

Source from the content-addressed store, hash-verified

419/// (`dirs::home_dir()` on Windows resolves the profile known-folder, not
420/// `HOME`, so an env override is the only reliable cross-platform isolation).
421pub fn global_config_dir() -> Option<PathBuf> {
422 global_config_dir_from(std::env::var_os("ATOMIC_CONFIG_DIR"))
423}
424
425/// Resolve the global config directory from an explicit override value.
426///

Callers 5

plugin_presentMethod · 0.85
is_plugin_installedMethod · 0.85
load_global_ignoreFunction · 0.85
global_ignore_pathFunction · 0.85
global_config_pathFunction · 0.85

Calls 1

global_config_dir_fromFunction · 0.85

Tested by

no test coverage detected