Skip to content

Commit

Permalink
check goTestExitErr before rerun
Browse files Browse the repository at this point in the history
re-run should be a no-op anyway, but out of an overabundance of caution, check it anyway.
  • Loading branch information
dnephin committed Jun 12, 2020
1 parent ccefcdd commit e8026de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func run(opts *options) error {
return err
}
goTestExitErr := goTestProc.cmd.Wait()
if opts.rerunFailsMaxAttempts > 0 {
if goTestExitErr != nil && opts.rerunFailsMaxAttempts > 0 {
cfg := testjson.ScanConfig{Execution: exec, Handler: handler}
goTestExitErr = rerunFailed(ctx, opts, cfg)
}
Expand Down

0 comments on commit e8026de

Please sign in to comment.