lair.config.get_data_dir#
- lair.config.get_data_dir(env_var, path=None)[source]#
Resolve a data directory.
- Parameters:
env_var (str) – Environment variable to fall back to, e.g.
'LAIR_INVENTORY_DIR'.path (str | os.PathLike, optional) – Explicit directory. Takes precedence over the environment variable.
- Returns:
Path – The data directory.
- Raises:
ValueError – If neither
pathnor the environment variable is set.- Return type: