From 46cd8362b6cab43ec84db64e271640aa60d89a80 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 11 May 2023 16:53:19 -0700 Subject: [PATCH] aider: Replaced "_" with the current working directory in find_common_root. # Context: USER: in find_common_root replace _ with the cwd ASSISTANT: ```python aider/coder.py <<<<<<< ORIGINAL if not self.abs_fnames: self.root = _ ======= if not self.abs_fnames: self.root = os.getcwd() >>>>>>> UPDATED ``` --- aider/coder.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aider/coder.py b/aider/coder.py index ddc355f87..4cc287e85 100755 --- a/aider/coder.py +++ b/aider/coder.py @@ -59,6 +59,8 @@ class Coder: self.show_diffs = show_diffs def find_common_root(self): + if not self.abs_fnames: + 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}")