diff --git a/aider/commands.py b/aider/commands.py index a276b66cb..4d67ba92e 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -756,6 +756,7 @@ class Commands: if self.io.confirm_ask(f"No files matched '{word}'. Do you want to create {fname}?"): try: + fname.parent.mkdir(parents=True, exist_ok=True) fname.touch() all_matched_files.add(str(fname)) except OSError as e: