mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 09:44:59 +00:00
feat: Expand home directory in cmd_read_only
This commit is contained in:
parent
61f7d60c47
commit
feae729f98
1 changed files with 4 additions and 1 deletions
|
@ -1037,7 +1037,10 @@ class Commands:
|
|||
|
||||
filenames = parse_quoted_filenames(args)
|
||||
for word in filenames:
|
||||
abs_path = self.coder.abs_root_path(word)
|
||||
# Expand the home directory if the path starts with "~"
|
||||
expanded_path = os.path.expanduser(word)
|
||||
abs_path = self.coder.abs_root_path(expanded_path)
|
||||
|
||||
if not os.path.exists(abs_path):
|
||||
self.io.tool_error(f"File not found: {abs_path}")
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue