mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 14:55:00 +00:00
use Path.touch() to create new files
This commit is contained in:
parent
b3d624b7cd
commit
bc60e7fd1c
1 changed files with 3 additions and 2 deletions
|
@ -3,6 +3,7 @@ import os
|
|||
import shlex
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
import git
|
||||
import tiktoken
|
||||
|
@ -238,8 +239,8 @@ class Commands:
|
|||
)
|
||||
|
||||
if create_file:
|
||||
with open(os.path.join(self.coder.root, word), "w"):
|
||||
pass
|
||||
(Path(self.coder.root) / word).touch()
|
||||
|
||||
matched_files = [word]
|
||||
if self.coder.repo is not None:
|
||||
self.coder.repo.git.add(os.path.join(self.coder.root, word))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue