Skip to content

Commit 80a299d

Browse files
zeripath6543
andauthored
Always wait for the cmd to finish (#14006)
After cancelling the context we still need to wait for the command to finish otherwise zombie processes may occur Fix #13987 Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: 6543 <[email protected]>
1 parent 5e09de1 commit 80a299d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

modules/git/command.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ func (c *Command) RunInDirTimeoutEnvFullPipelineFunc(env []string, timeout time.
153153
err := fn(ctx, cancel)
154154
if err != nil {
155155
cancel()
156+
_ = cmd.Wait()
156157
return err
157158
}
158159
}

0 commit comments

Comments
 (0)