This commit is contained in:
Jessie Wilson 2025-08-22 19:29:12 +00:00 committed by GitHub
commit e509e1c3fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -26,7 +26,13 @@ config: dict[str, Any] = {
"aliases": {}, "aliases": {},
"default_server": None, "default_server": None,
} }
configdir = os.environ.get("XDG_CONFIG_HOME", os.path.join(os.environ.get("HOME"), ".config")) home_dir = os.environ.get("HOME") or os.environ.get("USERPROFILE")
if home_dir is None:
raise EnvironmentError(
"Neither HOME nor USERPROFILE environment variables are set."
)
configdir = os.environ.get("XDG_CONFIG_HOME", os.path.join(home_dir, ".config"))
def get_default_server() -> tuple[str | None, str | None]: def get_default_server() -> tuple[str | None, str | None]: