fix: set cwd to repo root for shell commands in cmd_run

This commit is contained in:
Paul Gauthier (aider) 2024-11-26 19:53:09 -08:00
parent 973e86df27
commit 1a745e4fa9

View file

@ -876,7 +876,7 @@ class Commands:
def cmd_run(self, args, add_on_nonzero_exit=False):
"Run a shell command and optionally add the output to the chat (alias: !)"
exit_status, combined_output = run_cmd(
args, verbose=self.verbose, error_print=self.io.tool_error
args, verbose=self.verbose, error_print=self.io.tool_error, cwd=self.coder.root
)
if combined_output is None: