diff options
author | Ty Dunn <ty@tydunn.com> | 2023-06-25 21:29:26 -0700 |
---|---|---|
committer | Ty Dunn <ty@tydunn.com> | 2023-06-25 21:29:26 -0700 |
commit | bf87f7c93edd4fab865908e8232aac132a56c9c0 (patch) | |
tree | 134d27d396417f2c49f442eb3e5f31ba818a0123 | |
parent | ec52ab29ff9826467dc3b06ab0cc3011fce931a9 (diff) | |
download | sncontinue-bf87f7c93edd4fab865908e8232aac132a56c9c0.tar.gz sncontinue-bf87f7c93edd4fab865908e8232aac132a56c9c0.tar.bz2 sncontinue-bf87f7c93edd4fab865908e8232aac132a56c9c0.zip |
create global config if none
-rw-r--r-- | continuedev/src/continuedev/core/config.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/continuedev/src/continuedev/core/config.py b/continuedev/src/continuedev/core/config.py index 01316f1b..ed5d785a 100644 --- a/continuedev/src/continuedev/core/config.py +++ b/continuedev/src/continuedev/core/config.py @@ -105,6 +105,9 @@ def load_global_config() -> ContinueConfig: return ContinueConfig() else: config_path = os.path.join(global_dir, 'config.json') + if not os.path.exists(config_path): + with open(config_path, 'w') as f: + json.dump(dict(ContinueConfig()), f) with open(config_path, 'r') as f: try: config_dict = json.load(f) |