mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-11 15:15:18 +02:00
Merge pull request #137 from voidking/pr
bugfix: #128 Delete special charactors at filename
This commit is contained in:
commit
6f0b583662
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