mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-08 15:05:17 +02:00
修复issue #1144 在Windows系统上运行MetaGPT会出现该问题,Windows系统文件路径表示方法与Linux系统不一样
This commit is contained in:
parent
e03db313a2
commit
b9fa3687eb
2 changed files with 4 additions and 4 deletions
|
|
@ -270,11 +270,11 @@ class Engineer(Role):
|
|||
design_doc = None
|
||||
code_plan_and_change_doc = await self._get_any_code_plan_and_change() if await self._is_fixbug() else None
|
||||
for i in dependencies:
|
||||
if str(i.parent) == TASK_FILE_REPO:
|
||||
if str(i.parent.as_posix()) == TASK_FILE_REPO:
|
||||
task_doc = await self.project_repo.docs.task.get(i.name)
|
||||
elif str(i.parent) == SYSTEM_DESIGN_FILE_REPO:
|
||||
elif str(i.parent.as_posix()) == SYSTEM_DESIGN_FILE_REPO:
|
||||
design_doc = await self.project_repo.docs.system_design.get(i.name)
|
||||
elif str(i.parent) == CODE_PLAN_AND_CHANGE_FILE_REPO:
|
||||
elif str(i.parent.as_posix()) == CODE_PLAN_AND_CHANGE_FILE_REPO:
|
||||
code_plan_and_change_doc = await self.project_repo.docs.code_plan_and_change.get(i.name)
|
||||
if not task_doc or not design_doc:
|
||||
logger.error(f'Detected source code "{filename}" from an unknown origin.')
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ class DependencyFile:
|
|||
try:
|
||||
key = Path(filename).relative_to(root).as_posix()
|
||||
except ValueError:
|
||||
key = filename
|
||||
key= Path(filename).as_posix()
|
||||
return set(self._dependencies.get(str(key), {}))
|
||||
|
||||
def delete_file(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue