Expand description
Config directory resolution for the waratah CLI (XDG conventions).
Configuration that outlives a single command invocation โ the cluster
address table, the notebook service, a future licence file โ lives as
named files in a config directory, decoupled from --data-dir (which
holds state, not configuration). Lookups walk candidates in priority
order and take the first file that exists:
--config-dir PATHwhen given (exactly that directory, no fallback);- the platform user config dir +
waratah: Linux${XDG_CONFIG_HOME:-~/.config}/waratah, macOS~/Library/Application Support/waratah, Windows%APPDATA%\waratah(RoamingAppData, per thedirscrate convention); - the platform system config dir +
waratah: Linux/etc/waratah, macOS/Library/Application Support/waratah, Windows%PROGRAMDATA%\waratah(C:\ProgramData\waratah).
File names are fixed per consumer (cluster.toml, notebooks.toml);
find is generic so later consumers (licence file, โฆ) reuse it.
Modulesยง
- files ๐
- Config file names owned by current consumers.
Enumsยง
- Platform ๐
Functionsยง
- candidate_
dirs ๐ - Directories to search for a config file, highest priority first.
- find ๐
- First existing
file_namein the config search path, if any. - platform ๐
- system_
config_ ๐dir - system_
config_ ๐dir_ from - Pure core of
system_config_dir. - user_
config_ ๐dir_ from - Pure core of [
user_config_dir]:Noneinputs model unset env vars.