From 8d181ba78a2ac041eb6d8fbd935500c801c60663 Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 19 Nov 2023 10:26:07 -0800 Subject: [PATCH] pass tests on windows --- server/continuedev/core/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/continuedev/core/config.py b/server/continuedev/core/config.py index 4848e46d8..c8efd5e8d 100644 --- a/server/continuedev/core/config.py +++ b/server/continuedev/core/config.py @@ -519,7 +519,10 @@ class ContinueConfig(BaseModel): f.write(default_config_json) # Rename config.py to config.old.py - os.rename(py_path, py_path.replace(".py", ".old.py")) + old_path = py_path.replace(".py", ".py.old") + if os.path.exists(old_path): + os.remove(old_path) + os.rename(py_path, old_path) return ContinueConfig.load_default()