修复cmd执行之后返回错误的格式 (#488)

This commit is contained in:
Cathgao 2023-11-17 19:43:37 +08:00 committed by GitHub
parent 359c352022
commit 6481c9774e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -166,7 +166,7 @@ async def _(event: MessageEvent, cmd: str = ArgPlainText('cmd')):
try:
result = (stdout or stderr).decode('utf-8')
except Exception:
result = str(stdout or stderr)
result = (stdout or stderr).decode('gbk')
await run_cmd.finish(f'{cmd}\n运行结果:\n{result}')