mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 00:05:01 +00:00
create empty file
This commit is contained in:
parent
cfd415c8f2
commit
16d3ae0bf9
1 changed files with 6 additions and 0 deletions
6
coder.py
6
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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue