From 74dd294b3800e7f6b36eb59ab67a4de9bc5e5b2c Mon Sep 17 00:00:00 2001 From: Justin Bollinger Date: Mon, 16 Mar 2026 11:33:47 -0400 Subject: [PATCH] fix: fall back to ~/.hate_crack for config instead of cwd When no candidate directory has hate_crack assets, config destination fell back to cwd which fails on read-only filesystems like /. --- hate_crack/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hate_crack/main.py b/hate_crack/main.py index a8aa4ba..0b82b82 100755 --- a/hate_crack/main.py +++ b/hate_crack/main.py @@ -130,7 +130,9 @@ def _resolve_config_destination(): for candidate in _candidate_roots(): if _has_hate_crack_assets(candidate): return candidate - return os.getcwd() + fallback = os.path.join(os.path.expanduser("~"), ".hate_crack") + os.makedirs(fallback, exist_ok=True) + return fallback def _ensure_hashfile_in_cwd(hashfile_path):