mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
refactor: replace .touch() calls with utils.touch_file()
This commit is contained in:
parent
0f1b15942d
commit
b6b4fc6fab
1 changed files with 2 additions and 2 deletions
|
@ -352,7 +352,7 @@ class Coder:
|
|||
if not fname.exists():
|
||||
self.io.tool_output(f"Creating empty file {fname}")
|
||||
fname.parent.mkdir(parents=True, exist_ok=True)
|
||||
fname.touch()
|
||||
utils.touch_file(fname)
|
||||
|
||||
if not fname.is_file():
|
||||
raise ValueError(f"{fname} is not a file")
|
||||
|
@ -1678,7 +1678,7 @@ class Coder:
|
|||
|
||||
if not self.dry_run:
|
||||
Path(full_path).parent.mkdir(parents=True, exist_ok=True)
|
||||
Path(full_path).touch()
|
||||
utils.touch_file(Path(full_path))
|
||||
|
||||
# Seems unlikely that we needed to create the file, but it was
|
||||
# actually already part of the repo.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue