mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 16:25:00 +00:00
Allow test_cmd to be a callable
This commit is contained in:
parent
fa0aa60c97
commit
449cbf507f
1 changed files with 9 additions and 1 deletions
|
@ -535,7 +535,15 @@ class Commands:
|
|||
def cmd_test(self, args):
|
||||
"Run a shell command and add the output to the chat on non-zero exit code"
|
||||
|
||||
return self.cmd_run(args, True)
|
||||
if not callable(args):
|
||||
return self.cmd_run(args, True)
|
||||
|
||||
errors = args()
|
||||
if not errors:
|
||||
return
|
||||
|
||||
self.io.tool_error(errors, strip=False)
|
||||
return errors
|
||||
|
||||
def cmd_run(self, args, add_on_nonzero_exit=False):
|
||||
"Run a shell command and optionally add the output to the chat (alias: !)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue