diff --git a/config_mgmt.py b/config_mgmt.py index e9c4bd0f33..6e103db186 100644 --- a/config_mgmt.py +++ b/config_mgmt.py @@ -4,12 +4,14 @@ def save_config(data: dict): config_dir = Path(__file__).parent.absolute() / Path("Config") + plugin_dir = config_dir / Path("plugins") + plugin_dir.mkdir(exist_ok=True) for plugin in data: if plugin == "_version": continue data[plugin]["versions"].sort(key=lambda x: (x["date_committed"], x["date_authored"]), reverse=True) - json.dump(data[plugin] | {"_version": data["_version"]}, (config_dir / Path(f"{plugin}.json")).open("w"), sort_keys=True) + json.dump(data[plugin] | {"_version": data["_version"]}, (plugin_dir / Path(f"{plugin}.json")).open("w"), sort_keys=True) latest = data.copy() for plugin in latest: