mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-23 22:04:59 +00:00
Fixed a bug in Coder class where the common root directory was not being set correctly.
This commit is contained in:
parent
46cd8362b6
commit
173a91a8c2
1 changed files with 5 additions and 3 deletions
|
@ -59,10 +59,12 @@ class Coder:
|
|||
self.show_diffs = show_diffs
|
||||
|
||||
def find_common_root(self):
|
||||
if not self.abs_fnames:
|
||||
if self.abs_fnames:
|
||||
common_prefix = os.path.commonpath(list(self.abs_fnames))
|
||||
self.root = os.path.dirname(common_prefix)
|
||||
else:
|
||||
self.root = os.getcwd()
|
||||
common_prefix = os.path.commonpath(list(self.abs_fnames))
|
||||
self.root = os.path.dirname(common_prefix)
|
||||
|
||||
self.console.print(f"[bright_black]Common root directory: {self.root}")
|
||||
|
||||
def set_repo(self, cmd_line_fnames):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue