diff --git a/coder.py b/coder.py index 4a44f893f..c13ea1a2e 100755 --- a/coder.py +++ b/coder.py @@ -317,6 +317,12 @@ class Coder: after_text = self.strip_quoted_wrapping(after_text, fname) fname = Path(fname) + + # does it want to make a new file? + if not fname.exists() and not before_text: + print('Creating empty file:', fname) + fname.touch() + content = fname.read_text().splitlines() if not before_text and not content: