fix(tasks): fix task cancellation process tree leak, emit cancelled events, and refine status badges styling

This commit is contained in:
duorameng
2026-06-29 22:34:08 +08:00
parent e5fc716b8f
commit b52af6c4fd
10 changed files with 132 additions and 73 deletions
+3
View File
@@ -161,6 +161,9 @@ func ExecuteWithHooks(ctx context.Context, req Request, stdout, stderr io.Writer
shell, args := utils.GetShellCommand(req.Command)
cmd := exec.CommandContext(execCtx, shell, args...)
usePty := runtime.GOOS != "windows" && stdout != nil && (stdout == stderr || stdout == io.Discard)
SetProcessGroupAndCancel(cmd, usePty)
// 设置工作目录
// 设置工作目录
workDir := strings.TrimSpace(req.WorkDir)