Skip to main content

user_config_path

Function user_config_path 

Source
pub fn user_config_path() -> Option<PathBuf>
Expand description

Resolve the user-level (global) config.toml path using the same XDG/HOME priority as the loader: $XDG_CONFIG_HOME/defect/config.toml, else $HOME/.config/....

Returns None when neither XDG_CONFIG_HOME nor HOME is set. Used by defect init to write the global config to the same location the loader reads from.