diff --git a/aider/commands.py b/aider/commands.py index f4f41e612..43aefd0ae 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -149,11 +149,12 @@ class Commands: files = self.coder.get_all_relative_files() for word in args.split(): matched_files = [file for file in files if word in file] - if not matched_files: - if self.coder.repo is not None: - create_file = Confirm.ask( - f"[bright_black]No files matched '{word}'. Do you want to create the file and add it to git?" - ) + if not matched_files: + if self.coder.repo is not None: + create_file = Confirm.ask( + f"[bright_black]No files matched '{word}'. " + "Do you want to create the file and add it to git?" + ) else: create_file = Confirm.ask( f"[bright_black]No files matched '{word}'. Do you want to create the file?"