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:
Paul Gauthier 2023-05-11 22:37:59 -07:00
parent 5ddaf55dd2
commit 89149b307d

View file

@ -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)