Skip to content

Commit 2b81f7e

Browse files
authored
feat: Output last incomplete line in shell cronjob (#11391)
1 parent c08e83e commit 2b81f7e

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)