fix: Return test errors from cmd_run to enable auto-fixing

This commit is contained in:
Paul Gauthier (aider) 2025-03-31 09:21:34 +13:00 committed by Paul Gauthier
parent 83dac4aae2
commit 7dbb1a2aa8

View file

@ -1014,9 +1014,15 @@ class Commands:
dict(role="assistant", content="Ok."),
]
if add and exit_status != 0:
if add_on_nonzero_exit and exit_status != 0:
# Return the formatted output message for test failures
return msg
elif add and exit_status != 0:
self.io.placeholder = "What's wrong? Fix"
# Return None if output wasn't added or command succeeded
return None
def cmd_exit(self, args):
"Exit the application"
self.coder.event("exit", reason="/exit")