Skip to content

Commit

Permalink
Merge pull request #358 from gotestyourself/stderr-with-dots
Browse files Browse the repository at this point in the history
Fix dots formats with stderr
  • Loading branch information
dnephin authored Aug 20, 2023
2 parents e4e25bd + 2a6264b commit 1497b37
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmd/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,14 @@ func newEventHandler(opts *options) (*eventHandler, error) {
err: bufio.NewWriter(opts.stderr),
maxFails: opts.maxFails,
}

switch opts.format {
case "dots", "dots-v1", "dots-v2":
// Discard the error from the handler to prevent extra lines. The
// error will be printed in the summary.
handler.err = bufio.NewWriter(io.Discard)
}

var err error
if opts.jsonFile != "" {
_ = os.MkdirAll(filepath.Dir(opts.jsonFile), 0o755)
Expand Down

0 comments on commit 1497b37

Please sign in to comment.