add PROJECT_ROOT logging info

This commit is contained in:
garylin2099 2023-11-09 16:51:20 +08:00
parent a5bc55f18a
commit f0098f0ae9

View file

@ -18,12 +18,13 @@ def get_project_root():
or (current_path / ".gitignore").exists()
):
# use metagpt with git clone will land here
logger.info(f"PROJECT_ROOT set to {str(current_path)}")
return current_path
parent_path = current_path.parent
if parent_path == current_path:
# use metagpt with pip install will land here
cwd = Path.cwd()
logger.info(f"RPOJECT_ROOT set to current working directory: {str(cwd)}")
logger.info(f"PROJECT_ROOT set to current working directory: {str(cwd)}")
return cwd
current_path = parent_path