From 430eb2293951bc978d03ce523662607358740b82 Mon Sep 17 00:00:00 2001 From: MistEO Date: Wed, 10 Apr 2024 17:15:31 +0800 Subject: [PATCH] fix: wrong installation json --- install.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install.py b/install.py index d4a36a8..51ba79a 100644 --- a/install.py +++ b/install.py @@ -46,9 +46,12 @@ def install_resource(): install_path, ) - with open(install_path / "interface.json", "r+", encoding="utf-8") as f: + with open(install_path / "interface.json", "r", encoding="utf-8") as f: interface = json.load(f) - interface["version"] = version + + interface["version"] = version + + with open(install_path / "interface.json", "w", encoding="utf-8") as f: json.dump(interface, f, ensure_ascii=False, indent=4)