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 /.
This commit is contained in:
Justin Bollinger
2026-03-16 11:33:47 -04:00
parent 5dbd5bfd6f
commit 74dd294b38
+3 -1
View File
@@ -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):