mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-21 14:05:17 +02:00
bugfix: #128 Delete special charactors at filename
This commit is contained in:
parent
0601ad9c76
commit
7fc5dd9da2
1 changed files with 1 additions and 0 deletions
|
|
@ -93,6 +93,7 @@ class Engineer(Role):
|
|||
|
||||
def write_file(self, filename: str, code: str):
|
||||
workspace = self.get_workspace()
|
||||
filename = filename.replace('"', '').replace('\n', '')
|
||||
file = workspace / filename
|
||||
file.parent.mkdir(parents=True, exist_ok=True)
|
||||
file.write_text(code)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue