mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 01:35:00 +00:00
fixes #1944
This commit is contained in:
parent
c24ec7f230
commit
cbdabd3ae9
1 changed files with 11 additions and 4 deletions
|
@ -241,16 +241,23 @@ def parse_lint_cmds(lint_cmds, io):
|
|||
return res
|
||||
|
||||
|
||||
def generate_search_path_list(default_fname, git_root, command_line_file):
|
||||
def generate_search_path_list(default_file, git_root, command_line_file):
|
||||
files = []
|
||||
default_file = Path(default_fname)
|
||||
files.append(Path.home() / default_file) # homedir
|
||||
if git_root:
|
||||
files.append(Path(git_root) / default_file) # git root
|
||||
files.append(default_file.resolve())
|
||||
files.append(default_file)
|
||||
if command_line_file:
|
||||
files.append(command_line_file)
|
||||
files = [Path(fn).resolve() for fn in files]
|
||||
|
||||
resolved_files = []
|
||||
for fn in files:
|
||||
try:
|
||||
resolved_files.append(Path(fn).resolve())
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
files = resolved_files
|
||||
files.reverse()
|
||||
uniq = []
|
||||
for fn in files:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue