From 77985f00cf22ddb270f3267b17024793620856ad Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 9 Aug 2024 16:22:32 -0300 Subject: [PATCH] fix: Initialize abs_read_only_fnames set if it doesn't exist --- aider/commands.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/aider/commands.py b/aider/commands.py index b4c6e7384..e01b88b5b 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -953,19 +953,9 @@ class Commands: self.io.tool_error(f"Not a file: {abs_path}") return - if not self.coder.abs_read_only_fnames: - self.coder.abs_read_only_fnames = set() - self.coder.abs_read_only_fnames.add(abs_path) self.io.tool_output(f"Added {abs_path} to read-only files.") - content = self.io.read_text(abs_path) - if content is not None: - self.io.tool_output(f"Contents of {filename}:") - self.io.tool_output(content) - else: - self.io.tool_error(f"Unable to read {filename}") - def cmd_map(self, args): "Print out the current repository map" repo_map = self.coder.get_repo_map()