Fixed /run output to log

This commit is contained in:
Paul Gauthier 2023-05-28 11:20:08 -07:00
parent 67a1d7231c
commit 37e3e561f0
2 changed files with 7 additions and 4 deletions

View file

@ -227,14 +227,17 @@ class Commands:
except Exception as e:
self.io.tool_error(f"Error running command: {e}")
print(combined_output)
if self.io.confirm_ask("Add the output to the chat?", default="y"):
for line in combined_output.splitlines():
self.io.tool_output(line, log_only=True)
msg = prompts.run_output.format(
command=args,
output=combined_output,
)
self.io.tool_output(msg, log_only=False)
else:
print(combined_output)
return msg
def cmd_exit(self, args):
"Exit the application"