Skip to content

Commit f53bff8

Browse files
committed
feat: Output last incomplete line in shell cronjob
1 parent 825acd5 commit f53bff8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

agent/utils/cmd/cmdx.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func (c *CommandHelper) run(name string, arg ...string) (string, error) {
153153
return "", fmt.Errorf("cmd.Start() failed with '%s'\n", err)
154154
}
155155
if c.taskItem != nil {
156-
customWriter.Flush()
156+
defer customWriter.Flush()
157157
}
158158

159159
done := make(chan error, 1)

0 commit comments

Comments
 (0)