mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-23 22:04:59 +00:00
aider: Changed fname.touch()
to fname.touch(parents=True)
to create any missing directories in the path.
# Context: USER: when calling Path.touch() can we ask it to make missing dirs? ASSISTANT: Yes, you can use the `parents` parameter in the `touch()` method to create any missing directories. Set `parents=True` to create any missing directories in the path. Here's the change needed in the `aider/coder.py` file: ```python aider/coder.py <<<<<<< ORIGINAL fname.touch() ======= fname.touch(parents=True) >>>>>>> UPDATED ```
This commit is contained in:
parent
5ddaf55dd2
commit
89149b307d
1 changed files with 1 additions and 1 deletions
|
@ -78,7 +78,7 @@ class Coder:
|
|||
for fname in abs_fnames:
|
||||
if not fname.exists():
|
||||
self.console.print(f"[bright_black]Creating {fname}")
|
||||
fname.touch()
|
||||
fname.touch(parents=True)
|
||||
try:
|
||||
repo_path = git.Repo(fname, search_parent_directories=True).git_dir
|
||||
repo_paths.append(repo_path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue