修复 command-run 接口日志绑定

This commit is contained in:
whyour
2025-07-12 20:29:44 +08:00
parent 0587644a6b
commit 50769c43dd
6 changed files with 79 additions and 83 deletions
+4 -4
View File
@@ -279,14 +279,14 @@ export default (app: Router) => {
res.end();
},
onError: async (message: string) => {
res.write(`\n${message}`);
res.write(message);
const absolutePath = await handleLogPath(logPath);
await fs.appendFile(absolutePath, `\n${message}`);
await fs.appendFile(absolutePath, message);
},
onLog: async (message: string) => {
res.write(`\n${message}`);
res.write(message);
const absolutePath = await handleLogPath(logPath);
await fs.appendFile(absolutePath, `\n${message}`);
await fs.appendFile(absolutePath, message);
},
},
);