mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
fix: Initialize abs_read_only_fnames set if it doesn't exist
This commit is contained in:
parent
e7cdd1d7b8
commit
77985f00cf
1 changed files with 0 additions and 10 deletions
|
@ -953,19 +953,9 @@ class Commands:
|
||||||
self.io.tool_error(f"Not a file: {abs_path}")
|
self.io.tool_error(f"Not a file: {abs_path}")
|
||||||
return
|
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.coder.abs_read_only_fnames.add(abs_path)
|
||||||
self.io.tool_output(f"Added {abs_path} to read-only files.")
|
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):
|
def cmd_map(self, args):
|
||||||
"Print out the current repository map"
|
"Print out the current repository map"
|
||||||
repo_map = self.coder.get_repo_map()
|
repo_map = self.coder.get_repo_map()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue