diff --git a/aider/coder.py b/aider/coder.py index 7efa99a0c..322f6e426 100755 --- a/aider/coder.py +++ b/aider/coder.py @@ -78,7 +78,8 @@ class Coder: for fname in abs_fnames: if not fname.exists(): self.console.print(f"[bright_black]Creating {fname}") - fname.touch(parents=True) + fname.parent.mkdir(parents=True, exist_ok=True) + fname.touch() try: repo_path = git.Repo(fname, search_parent_directories=True).git_dir repo_paths.append(repo_path)