Config fix: don't crash when project was added but project.yml is missing

This commit is contained in:
Michael Panchenko committed 2025-05-30 18:50:26 +02:00
1 parent 6210171825
commit 6224cd21f1
1 file changed
+2 -2
+2 -2
View File
@@ -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)