From 391546cb50c049f760ac0ada6b242e2efa486b50 Mon Sep 17 00:00:00 2001 From: jayhack Date: Wed, 12 Feb 2025 11:21:37 -0800 Subject: [PATCH] . --- .../cli/workspace/initialize_workspace.py | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/codegen/cli/workspace/initialize_workspace.py b/src/codegen/cli/workspace/initialize_workspace.py index 70657e6ef..36ce988e8 100644 --- a/src/codegen/cli/workspace/initialize_workspace.py +++ b/src/codegen/cli/workspace/initialize_workspace.py @@ -82,18 +82,17 @@ def initialize_codegen( modify_gitignore(CODEGEN_FOLDER) # Create or update config.toml with basic repo info - if not session: # Only create if session doesn't exist (it handles config itself) - org_name, repo_name = get_git_organization_and_repo(repo) - config = {} - if CONFIG_PATH.exists(): - config = toml.load(CONFIG_PATH) - config.update( - { - "organization_name": config.get("organization_name", org_name), - "repo_name": config.get("repo_name", repo_name), - } - ) - CONFIG_PATH.write_text(toml.dumps(config)) + org_name, repo_name = get_git_organization_and_repo(repo) + config = {} + if CONFIG_PATH.exists(): + config = toml.load(CONFIG_PATH) + config.update( + { + "organization_name": config.get("organization_name", org_name), + "repo_name": config.get("repo_name", repo_name), + } + ) + CONFIG_PATH.write_text(toml.dumps(config)) # Create notebook template create_notebook(JUPYTER_DIR)