From 6224cd21f1caa109f6467f13562b3e509d1c14d3 Mon Sep 17 00:00:00 2001 From: Michael Panchenko Date: Fri, 30 May 2025 18:50:26 +0200 Subject: [PATCH] Config fix: don't crash when project was added but project.yml is missing --- src/serena/agent.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/serena/agent.py b/src/serena/agent.py index 629db3b4..df1c408a 100644 --- a/src/serena/agent.py +++ b/src/serena/agent.py @@ -323,8 +323,8 @@ class SerenaConfig(SerenaConfigBase): num_project_migrations = 0 for path in loaded_commented_yaml["projects"]: path = Path(path).resolve() - if not path.exists(): - log.warning(f"Project path {path} does not exist, skipping.") + if not path.exists() or (path.is_dir() and not (path / ProjectConfig.rel_path_to_project_yml()).exists()): + log.warning(f"Project path {path} does not exist or does not contain a project configuration file, skipping.") continue if path.is_file(): path = cls._migrate_out_of_project_config_file(path)