diff --git a/pkg/integration/clients/go_test.go b/pkg/integration/clients/go_test.go index 01f174211..89d8a0653 100644 --- a/pkg/integration/clients/go_test.go +++ b/pkg/integration/clients/go_test.go @@ -85,6 +85,7 @@ func runCmdHeadless(cmd *exec.Cmd) error { _, _ = io.Copy(io.Discard, f) if cmd.Wait() != nil { + _ = f.Close() // return an error with the stderr output return errors.New(stderr.String()) }