Not using direct write, but tmp write to avoid JSON parse error
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 12s
Python / lint-format (pull_request) Successful in 17s
Python / test (pull_request) Successful in 31s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m9s

This commit is contained in:
2026-06-14 01:08:36 +02:00
parent fecf8a886f
commit f31a1e224b
+11
View File
@@ -609,6 +609,17 @@ def generate(
name = palette_obj.scheme
flavor = palette_obj.variant
display_name = schemes[p_scheme].name
config["colors"]["presets"] = {
"name": display_name,
"variant": p_variant,
"accent": accent or "",
}
tmp = CONFIG.with_suffix(".json.tmp")
with tmp.open("w") as f:
json.dump(config, f, indent=4)
os.replace(tmp, CONFIG)
seed = hex_to_hct(colors.get("primary", "#000000").lstrip("#"))
else:
image_path = image_path or Path(WALL_PATH)