mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-05 20:25:01 +00:00
fix: Improve cmd_read_only function in Commands class
This commit is contained in:
parent
1dc325cc72
commit
9570d71b13
1 changed files with 6 additions and 2 deletions
|
@ -1039,6 +1039,10 @@ class Commands:
|
||||||
for word in filenames:
|
for word in filenames:
|
||||||
matched_files = self.glob_filtered_to_repo(word)
|
matched_files = self.glob_filtered_to_repo(word)
|
||||||
if not matched_files:
|
if not matched_files:
|
||||||
|
# If no files matched, try to use the word as a direct file path
|
||||||
|
if os.path.exists(word) and os.path.isfile(word):
|
||||||
|
matched_files = [word]
|
||||||
|
else:
|
||||||
self.io.tool_error(f"No files matched '{word}'.")
|
self.io.tool_error(f"No files matched '{word}'.")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue