rely on io.dry_run

This commit is contained in:
Paul Gauthier 2023-07-05 21:21:37 -07:00
parent 4ee5c49a04
commit 85c3bb8f12
4 changed files with 8 additions and 12 deletions

View file

@ -138,8 +138,7 @@ class EditBlockFunctionCoder(Coder):
content = self.io.read_text(full_path)
content = do_replace(full_path, content, original, updated)
if content:
if not self.dry_run:
self.io.write_text(full_path, content)
self.io.write_text(full_path, content)
edited.add(path)
continue
self.io.tool_error(f"Failed to apply edit to {path}")