fix: logs io buffer combine

This commit is contained in:
engigu
2026-02-08 11:03:11 +08:00
parent b291e3740f
commit 6402943462
9 changed files with 67 additions and 27 deletions
+2
View File
@@ -36,6 +36,7 @@ type Request struct {
// Result 任务执行结果
type Result struct {
Output string
Error string
Status string // success, failed
Duration int64 // 毫秒
ExitCode int
@@ -160,6 +161,7 @@ func ExecuteWithHooks(ctx context.Context, req Request, stdout, stderr io.Writer
if err != nil {
result.Status = "failed"
result.Error = err.Error()
if exitErr, ok := err.(*exec.ExitError); ok {
result.ExitCode = exitErr.ExitCode()
} else {