mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-04 03:35:00 +00:00
have io.write_text handle dry_run
This commit is contained in:
parent
b46dffbb20
commit
4ee5c49a04
2 changed files with 4 additions and 0 deletions
|
@ -101,6 +101,7 @@ class InputOutput:
|
|||
tool_output_color=None,
|
||||
tool_error_color="red",
|
||||
encoding="utf-8",
|
||||
dry_run=False,
|
||||
):
|
||||
no_color = os.environ.get("NO_COLOR")
|
||||
if no_color is not None and no_color != "":
|
||||
|
@ -144,6 +145,8 @@ class InputOutput:
|
|||
return
|
||||
|
||||
def write_text(self, filename, content):
|
||||
if self.dry_run:
|
||||
return
|
||||
with open(str(filename), "w", encoding=self.encoding) as f:
|
||||
f.write(content)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue