fix: use cwd=root when executing shell commands

This commit is contained in:
Paul Gauthier (aider) 2024-11-26 19:52:46 -08:00
parent 1f2917681f
commit 973e86df27

View file

@ -2112,7 +2112,7 @@ class Coder:
self.io.tool_output(f"Running {command}")
# Add the command to input history
self.io.add_to_input_history(f"/run {command.strip()}")
exit_status, output = run_cmd(command, error_print=self.io.tool_error)
exit_status, output = run_cmd(command, error_print=self.io.tool_error, cwd=self.root)
if output:
accumulated_output += f"Output from {command}\n{output}\n"