From 1b2ce80ed1748d674ce77334ba55dc5705933db4 Mon Sep 17 00:00:00 2001 From: MistEO Date: Wed, 10 Apr 2024 17:13:42 +0800 Subject: [PATCH] fix: wrong install json --- install.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install.py b/install.py index d4a36a86..35591d76 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)