wip: Added a dry-run option to do_replace function.

This commit is contained in:
Paul Gauthier 2023-05-14 10:15:08 -07:00
parent 0b8690654e
commit ab68022fb9

View file

@ -113,7 +113,9 @@ def do_replace(fname, before_text, after_text, dry_run=False):
if not new_content:
return
fname.write_text(new_content)
if not dry_run:
fname.write_text(new_content)
return True