fix(cli): preserve invalid config when backup fails

This commit is contained in:
somew1nd committed 2026-09-01 16:08:47 -07:00
1 parent 8003cf39c2
commit 41deb48005
2 files changed
+31 -1

No files matched your search

+3 -1
View File
@@ -219,8 +219,10 @@ def _merge_json_file(
except OSError as exc:
logger.warning(
f"Existing JSON in {file_path} could not be parsed AND the backup to"
f" {backup_path} failed ({exc}); the original content will be overwritten."
f" {backup_path} failed ({exc}); refusing to rewrite it."
" Fix or remove the file, then re-run the install."
)
return False
for remove_path in remove_paths:
parent = data