fix: publish the games index whole or not at all

install/games/, the event schema, the launcher index and wiki/installer.md were truncated at their final name, so an interrupted run left a committed-looking partial JSON document. They now go through write_text_atomic.
This commit is contained in:
Abdessamad Derraz committed 2026-11-05 19:16:59 +01:00
1 parent 80f736c167
commit 891741433b
5 files changed
+31 -4

No files matched your search

+2 -1
View File
@@ -59,6 +59,7 @@ from romfolders import ( # noqa: E402
folder_names,
load_setups,
)
from artifacts import write_text_atomic # noqa: E402
from safeparse import yaml_load # noqa: E402
import install # noqa: E402
@@ -635,7 +636,7 @@ def main() -> int:
path.unlink()
for path in changed:
path.parent.mkdir(parents=True, exist_ok=True)
path.write_text(files[path], encoding="utf-8")
write_text_atomic(str(path), files[path])
print(f"{len(changed)} written, {len(stale)} removed")
return 1 if failures else 0