Merge pull request #137 from voidking/pr

bugfix: #128 Delete special charactors at filename
This commit is contained in:
stellaHSR 2023-08-07 17:07:09 +08:00 committed by GitHub
commit 6f0b583662
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)