Skip to content

harbor_cli.dirs

Attributes

CONFIG_DIR = _PLATFORM_DIR.user_config_path module-attribute

DATA_DIR = _PLATFORM_DIR.user_data_path module-attribute

LOGS_DIR = _PLATFORM_DIR.user_log_path module-attribute

SITE_CONFIG_DIR = _PLATFORM_DIR.site_config_path module-attribute

Functions

init_directories() -> None

Source code in harbor_cli/dirs.py
def init_directories() -> None:
    for directory in [CONFIG_DIR, LOGS_DIR]:
        try:
            directory.mkdir(parents=True, exist_ok=True)
        except Exception as e:
            from .output.console import error

            # TODO: deduplicate these messages
            error(
                f"Unable to create directory {directory}: {e}",
                exc_info=True,
            )
            continue