Skip to content

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming

rm unnecessary mkdir and fixed a bug

garylin2099d2f53307441d
diff --git a/metagpt/actions/design_api.py b/metagpt/actions/design_api.py
index 3eb8fe04d..30dd14a2f 100644
--- a/metagpt/actions/design_api.py
+++ b/metagpt/actions/design_api.py
@@ -267,7 +267,6 @@ class WriteDesign(Action):
if not output_pathname:
output_pathname = Path(output_pathname) / "docs" / "sytem_design.json"
- output_pathname.mkdir(parents=True, exist_ok=True)
elif not Path(output_pathname).is_absolute():
output_pathname = DEFAULT_WORKSPACE_ROOT / output_pathname
output_pathname = Path(output_pathname)
diff --git a/metagpt/actions/project_management.py b/metagpt/actions/project_management.py
index 355a3853d..c9ba65682 100644
--- a/metagpt/actions/project_management.py
+++ b/metagpt/actions/project_management.py
@@ -188,7 +188,6 @@ class WriteTasks(Action):
if not output_pathname:
output_pathname = Path(output_pathname) / "docs" / "project_schedule.json"
- output_pathname.mkdir(parents=True, exist_ok=True)
elif not Path(output_pathname).is_absolute():
output_pathname = DEFAULT_WORKSPACE_ROOT / output_pathname
output_pathname = Path(output_pathname)
diff --git a/metagpt/actions/write_prd.py b/metagpt/actions/write_prd.py
index f66d586a3..e008d3a3b 100644
--- a/metagpt/actions/write_prd.py
+++ b/metagpt/actions/write_prd.py
@@ -313,7 +313,6 @@ class WritePRD(Action):
if not output_pathname:
output_pathname = DEFAULT_WORKSPACE_ROOT / "docs" / "prd.json"
- output_pathname.parent.mkdir(parents=True, exist_ok=True)
elif not Path(output_pathname).is_absolute():
output_pathname = DEFAULT_WORKSPACE_ROOT / output_pathname
output_pathname = Path(output_pathname)